-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (60 loc) · 2.12 KB
/
notify.yml
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
name: notify
on:
pull_request:
branches: master
types: [ opened, synchronize, closed ]
jobs:
notify:
runs-on: ubuntu-latest
steps:
- uses: 8398a7/action-slack@v3
if: github.event.action == 'opened'
with:
status: custom
fields: author
custom_payload: |
{
username: 'github-bot',
icon_emoji: ':octocat:',
attachments: [{
color: 'good',
title: 'New pull request at ${{ github.repository }}',
text: `Title: ${{ github.event.pull_request.title }}\nAuthor: ${process.env.AS_AUTHOR}\nPlease <${{ github.event.pull_request.html_url }}|review this PR>`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
- uses: 8398a7/action-slack@v3
if: github.event.action == 'synchronize'
with:
status: custom
fields: author
custom_payload: |
{
username: 'solus-github-bot',
icon_emoji: ':octocat:',
attachments: [{
color: 'good',
title: 'Pull request was updated at ${{ github.repository }}',
text: `Title: ${{ github.event.pull_request.title }}\nAuthor: ${process.env.AS_AUTHOR}\nPlease <${{ github.event.pull_request.html_url }}|review this PR>`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
- uses: 8398a7/action-slack@v3
if: github.event.action == 'closed' && github.event.pull_request.merged == true
with:
status: custom
fields: author
custom_payload: |
{
username: 'solus-github-bot',
icon_emoji: ':octocat:',
attachments: [{
color: 'good',
title: 'Pull request was merged at ${{ github.repository }}',
text: `Title: ${{ github.event.pull_request.title }}\nAuthor: ${process.env.AS_AUTHOR}`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}