-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1136 from interlay/dom/notify-breaking
feat: notify team of breaking changes on discord
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Breaking change notification | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
|
||
jobs: | ||
check-commit-messages: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Check Commit Messages | ||
id: check_commit_messages | ||
run: | | ||
commit_messages=$(git log --format=%B ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}) | ||
if echo "$commit_messages" | grep -q '!' || echo "$commit_messages" | grep -q '[BREAKING]'; then | ||
echo "BREAKING_CHANGE_DETECTED=true" >> $GITHUB_ENV | ||
fi | ||
- name: Send Discord Notification | ||
uses: Ilshidur/action-discord@master | ||
with: | ||
args: "Breaking change detected in PR: ${{ github.event.pull_request.html_url }}" | ||
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }} | ||
if: env.BREAKING_CHANGE_DETECTED == 'true' |