2023-10-05 08:32:19 +00:00
|
|
|
name: Send a Slack notification when a PR contains rest api changes
|
2023-10-05 09:21:27 +00:00
|
|
|
|
2023-10-05 08:32:19 +00:00
|
|
|
on:
|
|
|
|
pull_request_target:
|
|
|
|
types: [labeled]
|
|
|
|
|
|
|
|
permissions: {}
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
send-slack-notification-when-pr-contains-rest-api-changes:
|
|
|
|
if: "${{ github.event.label.name == 'contains: rest api change' && (github.event.pull_request.state == 'open' || github.event.pull_request.merged) }}"
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
|
|
- name: Wait 2 minutes for other labelling jobs to finish
|
|
|
|
run: sleep 2m
|
|
|
|
shell: bash
|
|
|
|
- name: Notify Slack
|
|
|
|
uses: archive/github-actions-slack@d9dae40827adf93bddf939db6552d1e392259d7d
|
|
|
|
id: notify
|
|
|
|
with:
|
|
|
|
slack-bot-user-oauth-access-token: ${{ secrets.TEST_ASSISTANCE_BOT_TOKEN }}
|
|
|
|
slack-channel: ${{ secrets.WOO_CORE_REST_API_CHANGES_SLACK_CHANNEL }}
|
|
|
|
slack-text: |
|
|
|
|
<${{ github.event.pull_request.html_url }}|${{ github.event.pull_request.title }}>
|
|
|
|
*Labels:* ${{ join(github.event.pull_request.labels.*.name, ', ') }}
|
2023-10-05 09:21:27 +00:00
|
|
|
*Milestone:* <${{ github.event.pull_request.milestone.html_url }}|${{ github.event.pull_request.milestone.title }}>
|
2023-10-05 08:32:19 +00:00
|
|
|
slack-optional-unfurl_links: false
|
|
|
|
slack-optional-unfurl_media: false
|