Skip to content

CI: fetch PR head ref before checkout to prevent test job SHA misses - #53

Draft
watney1024 with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-job-test
Draft

CI: fetch PR head ref before checkout to prevent test job SHA misses#53
watney1024 with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-github-actions-job-test

Conversation

Copilot AI commented Aug 26, 2026

Copy link
Copy Markdown

test failed in Actions during checkout because GITHUB_SHA was not present in the local mirror after PR sync. The workflow fetched only the PR merge ref, while some runs require the PR head commit object to resolve checkout.

  • Root-cause scope

    • Checkout path in CI mirror sync for pull_request runs (.github/workflows/ci.yml) could miss GITHUB_SHA objects.
  • Workflow sync hardening

    • In both test and benchmark jobs, retained merge-ref fetch and added head-ref fetch:
      • refs/pull/${PR_NUMBER}/merge
      • refs/pull/${PR_NUMBER}/head
    • No changes to test commands or benchmark logic; only fetch coverage before checkout.
  • Representative change

echo "Fetching PR #${PR_NUMBER} merge ref..."
retry "git fetch PR #${PR_NUMBER}" git fetch origin "refs/pull/${PR_NUMBER}/merge" || exit 1
echo "Fetching PR #${PR_NUMBER} head ref..."
retry "git fetch PR #${PR_NUMBER} head" git fetch origin "refs/pull/${PR_NUMBER}/head" || exit 1

Co-authored-by: watney1024 <104301989+watney1024@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job test CI: fetch PR head ref before checkout to prevent test job SHA misses Aug 26, 2026
Copilot AI requested a review from watney1024 August 26, 2026 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants