Skip to content

Commit

Permalink
ci/conv-commits: only check commits in PR
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 committed Aug 5, 2024
1 parent a013dd7 commit 7bc0941
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 7bc0941

Please sign in to comment.