diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index dffc4a603..64068dea9 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -46,7 +46,9 @@ jobs: - name: Run commitlint (check locally with `nix-shell --run postgrest-commitlint`) run: | # Fetch target branch explicitly - git fetch origin ${{ github.base_ref }} + # For PRs event -> github.base_ref + # For push event -> github.ref_name + git fetch origin ${{ github.base_ref || github.ref_name }} # Run commitlint - postgrest-commitlint --from origin/${{ github.base_ref }} --to HEAD + postgrest-commitlint --from origin/${{ github.base_ref || github.ref_name }} --to HEAD