Skip to content

Commit 75a2d95

Browse files
authored
Add Discord notification for new pull requests
1 parent 695a70b commit 75a2d95

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/discord.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Discord PR Notification
2+
3+
on:
4+
pull_request:
5+
types: [opened]
6+
7+
jobs:
8+
notify:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Send PR notification to Discord
13+
run: |
14+
curl -H "Content-Type: application/json" \
15+
-d '{
16+
"content": "🚀 New Pull Request created!",
17+
"embeds": [
18+
{
19+
"title": "${{ github.event.pull_request.title }}",
20+
"url": "${{ github.event.pull_request.html_url }}",
21+
"description": "Author: ${{ github.event.pull_request.user.login }}"
22+
}
23+
]
24+
}' \
25+
"${{ secrets.DISCORD_WEBHOOK }}"

0 commit comments

Comments
 (0)