From 31789cc369d9ba4f3ec62bc19937755f3d1422f1 Mon Sep 17 00:00:00 2001 From: Sachin Kumar Date: Wed, 28 Feb 2024 16:56:18 +0530 Subject: [PATCH] ci: fix commitlint check (#1192) --- .github/workflows/nodejs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index d24f1c9e..56f0aa7a 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -51,8 +51,9 @@ jobs: - name: Security audit run: npm run security -- --only=prod - - name: Check commit message - uses: wagoid/commitlint-github-action@v5 + - name: Validate PR commits with commitlint + if: github.event_name == 'pull_request' + run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose test: name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }}