-
Notifications
You must be signed in to change notification settings - Fork 178
51 lines (48 loc) · 1.64 KB
/
notify-docs-team.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
name: Notify Docs team
on:
pull_request:
types: [opened, ready_for_review]
jobs:
check:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
outputs:
files: ${{ steps.changes.outputs.files }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: changes
with:
filters: |
files:
- '.changelog/**'
- 'website/**'
slack-notification:
needs: check
if: ${{ needs.check.outputs.files == 'true' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write # Needed by sticky-pull-request-comment
steps:
- uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_DOCS }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "hey ${{ secrets.SLACK_DOCS_TAG }}, this is APIx bot, can you please review <${{ github.event.pull_request.html_url }}|PR ${{ github.event.pull_request.number }}>? thanks a lot!"
}
}
]
}
- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31
with:
header: pr-title-slack-doc
append: true
message: "APIx bot: a message has been sent to Docs Slack channel"