Skip to content

Commit

Permalink
ci: cz: only check PR commits
Browse files Browse the repository at this point in the history
Once something is merged, it does not make sense (and it's too late) to
check it.

So, limit the check to commits in a given PR.

Signed-off-by: Kir Kolyshkin <[email protected]>
  • Loading branch information
kolyshkin authored and polyfloyd committed Aug 6, 2024
1 parent a013dd7 commit 1f1e448
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ jobs:
run: go test -test.v -race -cover ./...

conventional-commits:
if: github.event_name == 'pull_request' # Only check PRs.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: pip3 install -U Commitizen
# The commit hash here is that of the commit where we started using conventional commits.
- run: cz check --rev-range deebab92..HEAD
- run: cz check --rev-range origin/${{ github.base_ref }}..HEAD

0 comments on commit 1f1e448

Please sign in to comment.