Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

chore(ci): notify Discord on new issues only

Andrej4844f9870031
diff --git a/.github/workflows/issue-notify.yml b/.github/workflows/issue-notify.yml
new file mode 100644
index 000000000..b856a8918
--- /dev/null
+++ b/.github/workflows/issue-notify.yml
@@ -0,0 +1,25 @@
+name: Notify Discord on new issue
+
+on:
+ issues:
+ types: [opened]
+
+jobs:
+ notify:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Post to Discord
+ env:
+ ISSUE_TITLE: ${{ github.event.issue.title }}
+ ISSUE_URL: ${{ github.event.issue.html_url }}
+ ISSUE_NUMBER: ${{ github.event.issue.number }}
+ AUTHOR: ${{ github.event.issue.user.login }}
+ WEBHOOK: ${{ secrets.DISCORD_ISSUE_WEBHOOK }}
+ run: |
+ payload=$(jq -nc \
+ --arg title "$ISSUE_TITLE" \
+ --arg url "$ISSUE_URL" \
+ --arg number "$ISSUE_NUMBER" \
+ --arg author "$AUTHOR" \
+ '{content: "New issue #\($number) by **\($author)**: \($title)\n\($url)"}')
+ curl -fsS -H "Content-Type: application/json" -d "$payload" "$WEBHOOK"