From d9105b412869ed2cef41b849af5d2f8abbeb4faf Mon Sep 17 00:00:00 2001 From: alexbelgium Date: Tue, 21 Jul 2026 21:41:33 +0200 Subject: [PATCH] Fix HEAD^1 resolution: fetch-depth 2 on check-addon-changes checkout Confirmed on the live run: a depth-1 (default) shallow checkout of the merge commit truncates parent refs at that boundary commit entirely, so git rev-parse HEAD^1 fails with "unknown revision" even though the merge commit itself is checked out fine. Bumping this job's checkout to fetch-depth: 2 pulls in both the merge commit and its two parents, making HEAD^1 resolvable with a real tree to diff against. --- .github/workflows/onpr_check-pr.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/onpr_check-pr.yaml b/.github/workflows/onpr_check-pr.yaml index bd4ab6a197..5dc7d84144 100644 --- a/.github/workflows/onpr_check-pr.yaml +++ b/.github/workflows/onpr_check-pr.yaml @@ -19,6 +19,10 @@ jobs: steps: - name: Checkout repo uses: actions/checkout@v7 + with: + # Need the merge commit's parents resolvable (HEAD^1 below): a depth-1 shallow + # checkout truncates parent refs entirely at the boundary commit. + fetch-depth: 2 - name: Find changed addon directories id: find_addons run: |