From 0b69ad0e65b6514f9820e91cdcda805f6ac56037 Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Wed, 18 Jun 2025 02:42:52 +0500 Subject: [PATCH] ci: fix commitlint CI failure --- .github/workflows/check.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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