-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) · 1.25 KB
/
pull_request_notification.yml
File metadata and controls
39 lines (36 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Notify Discord on Pull Request
on:
pull_request:
types: [opened]
jobs:
notify-discord:
runs-on: ubuntu-latest
steps:
- name: Send Discord Notification
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
run: |
curl -H "Content-Type: application/json" \
-d '{
"username": "GitHub Bot",
"avatar_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
"embeds": [{
"title": "New Pull Request",
"description": "A new pull request has been opened in the repository.",
"url": "${{ github.event.pull_request.html_url }}",
"color": 3066993,
"fields": [
{
"name": "Title",
"value": "${{ github.event.pull_request.title }}",
"inline": true
},
{
"name": "Author",
"value": "${{ github.event.pull_request.user.login }}",
"inline": true
}
]
}]
}' \
$DISCORD_WEBHOOK_URL