Skip to content

Commit ce0e05d

Browse files
author
github-actions
committed
[Autofic] Create package.json and CI workflow
1 parent 9a5acf1 commit ce0e05d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/pr_notify.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: PR Notifier
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, closed]
6+
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Notify Discord
12+
env:
13+
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
14+
run: |
15+
curl -H "Content-Type: application/json" -d '{"content": "🔔 Pull Request [${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) by ${{ github.event.pull_request.user.login }} - ${{ github.event.action }}"}' $DISCORD_WEBHOOK_URL
16+
- name: Notify Slack
17+
env:
18+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
19+
run: |
20+
curl -H "Content-Type: application/json" -d '{"text": ":bell: Pull Request <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}> by ${{ github.event.pull_request.user.login }} - ${{ github.event.action }}"}' $SLACK_WEBHOOK_URL

0 commit comments

Comments
 (0)