From fd05335c2e28e8f979da5fc3015a1b1217aa5d4f Mon Sep 17 00:00:00 2001 From: Richie McIlroy <33632126+richiemcilroy@users.noreply.github.com> Date: Sat, 24 Oct 2026 06:08:09 +0100 Subject: [PATCH] ci(windows-targets): fetch the PR base commit before comparing against it --- .github/workflows/windows-targets.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/windows-targets.yml b/.github/workflows/windows-targets.yml index aebfc965560..ca235f3a565 100644 --- a/.github/workflows/windows-targets.yml +++ b/.github/workflows/windows-targets.yml @@ -44,6 +44,8 @@ jobs: $source = "crates/scap-targets/src/platform/win.rs" $patchedSource = [System.IO.File]::ReadAllBytes($source) try { + git cat-file -e "$($env:BASE_SHA)^{commit}" 2>$null + if ($LASTEXITCODE -ne 0) { git fetch --no-tags --depth=1 origin $env:BASE_SHA } $baseline = git show "$($env:BASE_SHA):$source" if ($LASTEXITCODE -ne 0) { throw "Could not load base Windows implementation" } $baseline | Set-Content -Encoding utf8 $source