Skip to content

Commit b021ea3

Browse files
committed
tools: do not flag force push as invalid message
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 242909f commit b021ea3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
3333

3434
validateCommitMessage:
35+
# If a commit is force-pushed out of the main branch, the `commits` array is
36+
# empty and there are no checks to run.
37+
if: github.event.commits[0]
3538
name: Notify on Push on `main` with invalid message
3639
# cannot use ubuntu-slim here because rtCamp/action-slack-notify is dockerized
3740
runs-on: ubuntu-24.04-arm

0 commit comments

Comments
 (0)