Skip to content

Commit a99cda1

Browse files
committed
ci: add Slack notification for new issues
1 parent cd5537e commit a99cda1

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/notify-issue.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Issue Notification
2+
on:
3+
issues:
4+
types: [opened]
5+
jobs:
6+
notify:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Notify Slack
10+
if: ${{ secrets.SLACK_WEBHOOK != '' }}
11+
run: |
12+
TITLE="${{ github.event.issue.title }}"
13+
URL="${{ github.event.issue.html_url }}"
14+
AUTHOR="${{ github.event.issue.user.login }}"
15+
NUM="${{ github.event.issue.number }}"
16+
curl -sf -X POST "${{ secrets.SLACK_WEBHOOK }}" \
17+
-H "Content-Type: application/json" \
18+
-d "{\"text\": \"🐛 New issue #${NUM} on aimock by *${AUTHOR}*: <${URL}|${TITLE}>\"}"

0 commit comments

Comments
 (0)