-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (74 loc) · 2.6 KB
/
pr-notify.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: PR Notification
on:
issue_comment:
types: [created]
pull_request:
types: [opened]
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [created]
jobs:
approved:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: PR approved
message: |
**${{ github.event.pull_request.title }}**
${{ github.event.pull_request.html_url }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub PR Notifier
opened:
if: github.event.action == 'opened'
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: New PR opened
message: |
**${{ github.event.pull_request.title }}**
**Creator:** ${{ github.event.pull_request.user.login }}
${{ github.event.pull_request.html_url }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub PR Notifier
review_commented:
if: github.event_name == 'pull_request_review_comment'
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: Review Commented
message: |
**${{ github.event.pull_request.title }}**
${{ github.event.comment.body }}
${{ github.event.comment.html_url }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub PR Notifier
pr_commented:
name: PR comment
if: |
github.event.issue.pull_request
&& github.actor != 'vercel[bot]'
&& github.event.action != 'opened'
runs-on: ubuntu-latest
steps:
- name: Send Discord notification
uses: stegzilla/discord-notify@v2
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
title: PR Commented
message: |
**${{ github.event.pull_request.title }}**
${{ github.event.comment.body }}
${{ github.event.comment.html_url }}
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
username: GitHub PR Notifier