From 8b60e423e9f4d410c0f1c2cc501ed7a475944c7c Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Fri, 13 Mar 2026 18:10:50 +0100 Subject: [PATCH] tools: validate all commits that are pushed to `main` --- .github/workflows/notify-on-push.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/notify-on-push.yml b/.github/workflows/notify-on-push.yml index 9b704b788261ba..605a896541f2f3 100644 --- a/.github/workflows/notify-on-push.yml +++ b/.github/workflows/notify-on-push.yml @@ -30,20 +30,16 @@ jobs: validateCommitMessage: name: Notify on Push on `main` with invalid message - if: github.repository == 'nodejs/node' # cannot use ubuntu-slim here because rtCamp/action-slack-notify is dockerized runs-on: ubuntu-24.04-arm steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - persist-credentials: false - - name: Check commit message + - name: Validate commits + run: echo "$COMMITS" | npx -q core-validate-commit - id: commit-check - run: npx -q core-validate-commit "$COMMIT" env: - COMMIT: ${{ github.event.after }} + COMMITS: ${{ toJSON(github.event.commits) }} - name: Slack Notification - if: ${{ failure() && steps.commit-check.conclusion == 'failure' }} + if: ${{ failure() && steps.commit-check.conclusion == 'failure' && github.repository == 'nodejs/node' }} uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3 env: SLACK_COLOR: '#DE512A'