Skip to content

Commit 607a741

Browse files
authored
tools: only report commit validation failure on Slack
PR-URL: #61124 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Xuguang Mei <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 9d27d9a commit 607a741

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/notify-on-push.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ jobs:
3636
with:
3737
persist-credentials: false
3838
- name: Check commit message
39+
id: commit-check
3940
run: npx -q core-validate-commit "$COMMIT"
4041
env:
4142
COMMIT: ${{ github.event.after }}
4243
- name: Slack Notification
43-
if: failure()
44+
if: ${{ failure() && steps.commit-check.conclusion == 'failure' }}
4445
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3
4546
env:
4647
SLACK_COLOR: '#DE512A'

0 commit comments

Comments
 (0)