You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 5, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: .github/workflows/feature-launcher.yml
+44-6Lines changed: 44 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,51 @@ jobs:
12
12
- name: Send Feature Release Notification to Discord
13
13
env:
14
14
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
15
+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
15
16
ISSUE_TITLE: ${{ github.event.issue.title }}
16
17
ISSUE_BODY: ${{ github.event.issue.body }}
17
18
ISSUE_URL: ${{ github.event.issue.html_url }}
18
19
run: |
19
-
curl -H "Content-Type: application/json" \
20
-
-X POST \
21
-
-d '{
22
-
"content": "**🚀 New Feature Launched!**\n\n🎉 *${{ env.ISSUE_TITLE }}* is now available to try!\n📖 Description: ${{ env.ISSUE_BODY }}\n🔗 [Check it out here](${{ env.ISSUE_URL }})"
23
-
}' \
24
-
$DISCORD_WEBHOOK
20
+
node -e '
21
+
const https = require("https");
22
+
const discordWebhook = new URL(process.env.DISCORD_WEBHOOK);
23
+
const slackWebhook = new URL(process.env.SLACK_WEBHOOK);
24
+
25
+
const issueTitle = process.env.ISSUE_TITLE;
26
+
const issueBody = process.env.ISSUE_BODY;
27
+
const issueUrl = process.env.ISSUE_URL;
28
+
29
+
// Discord Payload
30
+
const discordPayload = {
31
+
content: [
32
+
"**🚀 " +issueTitle + " has been released!**",
33
+
"",
34
+
"**🌟 Whats new in CodeGate:**",
35
+
issueBody,
36
+
"",
37
+
"We would 🤍 your feedback! 🔗 [Here’s the GitHub issue](" + issueUrl + ")"
38
+
].join("\n")
39
+
};
40
+
41
+
// Slack Payload
42
+
const slackPayload = {
43
+
text: `🚀 *${issueTitle}* has been released!\n\n 🔗 <${issueUrl}|Here’s the GitHub issue>`,
0 commit comments