From 4d5c361db762843c62e8bdd088ffff9940ed970a Mon Sep 17 00:00:00 2001 From: justintaddei Date: Thu, 27 Jun 2024 11:54:35 -0600 Subject: [PATCH] ci: fix commitlint failing on PRs --- .github/workflows/commitlint.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index bab4868..7f41145 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -7,6 +7,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - uses: pnpm/action-setup@v2 with: version: 9 @@ -26,4 +28,4 @@ jobs: - 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 + run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose