From c445cc9ea27eb0c7e432c9ffe142e3b34c550597 Mon Sep 17 00:00:00 2001 From: CodeWhale Bot Date: Wed, 23 Sep 2026 17:52:52 -0700 Subject: [PATCH] ci: force-update the base ref in change detection Change detection on #6417 failed with `! [rejected] main -> origin/main (non-fast-forward)`: main moved (the #6431 merge) after checkout had fetched origin/main, and the --depth=1 fetch cannot prove the new tip descends from the old one. The ref is a scratch remote-tracking ref for the diff base, so a forced update is always right. Verification: actionlint with CI's flags clean. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74452ea4e7..ab9e645767 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ jobs: base="" if [[ "${EVENT_NAME}" == "pull_request" && -n "${BASE_REF}" ]]; then - git fetch --no-tags origin "${BASE_REF}:refs/remotes/origin/${BASE_REF}" --depth=1 + git fetch --no-tags origin "+${BASE_REF}:refs/remotes/origin/${BASE_REF}" --depth=1 base="origin/${BASE_REF}" elif [[ -n "${BEFORE_SHA}" && "${BEFORE_SHA}" != "0000000000000000000000000000000000000000" ]]; then base="${BEFORE_SHA}"