chore: send a notification to Slack when there is a breaking change (#44699)

We would like this to have a bit better chance for helping out with
breaking changes in the beginning and also to have a historical overview
of what happened.
This commit is contained in:
Levente Balogh 2022-02-08 11:20:11 +01:00 committed by GitHub
parent e50a78a61a
commit ffee50b57c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,6 +99,21 @@ jobs:
number: ${{ github.event.workflow_run.pull_requests[0].number }}
delete: true
# Posts a notification to Slack if a PR has a breaking change and it did not have a breaking change before
- name: Post to Slack
id: slack
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}
uses: slackapi/slack-github-action@v1.18.0
with:
payload: |
{
"pr_link": "${{ github.event.workflow_run.pull_requests[0].url }}",
"pr_number": "${{ github.event.workflow_run.pull_requests[0].number }}",
"job_link": "${{ steps.levitate-run.outputs.job_link }}",
"message": "${{ steps.levitate-run.outputs.message }}"
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_LEVITATE_WEBHOOK_URL }}
- name: Add "breaking change" label
if: ${{ steps.levitate-run.outputs.exit_code == 1 && steps.does-label-exist.outputs.result == 0 }}