From 8a70d36418d8df69461da5b9dd0d14b6a40e2df8 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Sat, 16 May 2026 02:55:04 +0000 Subject: [PATCH] fix(pr-validation): add head_ref fetch to checkout step (PRI-1588) The checkout step was missing git fetch for github.head_ref, causing "unable to read tree" errors on PRs since the PR head SHA is not on main. Co-Authored-By: Paperclip --- .github/workflows/pr-validation.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-validation.yaml b/.github/workflows/pr-validation.yaml index ee0e1d1..73c2b7f 100644 --- a/.github/workflows/pr-validation.yaml +++ b/.github/workflows/pr-validation.yaml @@ -6,12 +6,16 @@ on: jobs: validate: - runs-on: runners-privilegedescalation + runs-on: ubuntu-latest timeout-minutes: 5 steps: - name: Checkout - uses: actions/checkout@v6 + run: | + git clone --depth=1 "https://x-access-token:${{ secrets.GITEA_TOKEN }}@git.farh.net/${{ github.repository }}.git" . + git fetch origin "${{ github.base_ref }}" --depth=1 + git fetch origin "${{ github.head_ref }}" --depth=1 + git checkout "${{ github.sha }}" - name: Install actionlint run: |