From 2d7f2e1b74dfe67f7e036ca368ef0df6e7911b76 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Sat, 16 May 2026 21:47:13 +0000 Subject: [PATCH] fix(pr-validation): fetch PR head refs instead of branch name Prior --depth=1 fetch of $HEAD_REF fails because shallow clone doesn't bring in the PR head branch as a ref. Co-Authored-By: Paperclip --- .github/workflows/pr-validation.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-validation.yaml b/.github/workflows/pr-validation.yaml index 306f7b4..69124b0 100644 --- a/.github/workflows/pr-validation.yaml +++ b/.github/workflows/pr-validation.yaml @@ -17,7 +17,7 @@ jobs: run: | git clone --depth=1 "https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.farh.net/${{ github.repository }}.git" . git fetch origin "$BASE_REF" --depth=1 - git fetch origin "$HEAD_REF" --depth=1 + git fetch origin +refs/pull/*/head:refs/pull/*/head --depth=1 git checkout "${{ github.sha }}" - name: Install actionlint