-
Notifications
You must be signed in to change notification settings - Fork 9.2k
79 lines (73 loc) · 2.72 KB
/
pull_request_feed.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: "Pull Request Feed"
on:
pull_request_target:
types: [opened, closed]
env:
SLACK_WEBHOOK_URL: ${{ secrets.FEED_SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
GH_TOKEN: ${{ github.token }}
jobs:
community_check:
uses: ./.github/workflows/community-check.yml
secrets: inherit
with:
username: ${{ github.event.pull_request.user.login }}
NotificationPRMerged:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- name: Notification PR Merged
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":merged: <${{ github.event.pull_request.merged_by.html_url }}|${{ github.event.pull_request.merged_by.login }}> merged <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>"
}
}
]
}
NotificationMaintainerPROpened:
needs: community_check
runs-on: ubuntu-latest
steps:
- name: Notification Maintainer PR Opened
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
if: github.event.action == 'opened' && needs.community_check.outputs.maintainer == 'true' && github.actor != 'dependabot[bot]'
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":open: <${{ github.event.pull_request.user.html_url }}|${{ github.event.pull_request.user.login }}> opened <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>"
}
}
]
}
NotificationPartnerPROpened:
needs: community_check
runs-on: ubuntu-latest
steps:
- name: Notification Partner PR Opened
uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117
if: github.event.action == 'opened' && needs.community_check.outputs.partner == 'true'
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":open: :aws: contributor <${{ github.event.pull_request.user.html_url }}|${{ github.event.pull_request.user.login }}> opened <${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>"
}
}
]
}