Skip to content

Test the pushed pull request commit, not its branch's current tip - #9191

Open
craigmichaelmartin wants to merge 1 commit into
mainfrom
test-pull-request-head-sha
Open

craigmichaelmartin wants to merge 1 commit into
mainfrom
test-pull-request-head-sha

Conversation

@craigmichaelmartin

Copy link
Copy Markdown
Contributor

WHY are these changes introduced?

Every job in tests-pr.yml checks out the pull request's head branch by name (head.ref). A job that waits for a runner tests whatever the branch points at when it starts, but GitHub reports its result on the commit the event named. When the branch moves in between, a check reported on one commit comes from testing another. Releases from stable/* rely on the checks of the exact commit that merges.

WHAT is this pull request doing?

Checks out the event's head SHA in every job: pull_request.head.sha, or merge_group.head_sha in the merge queue.

How to manually test your changes?

In this pull request's checks, each job's checkout step names the pull request's head commit, the same commit its check is reported on.

🤖 Generated with Claude Code

Every tests-pr.yml checkout used the head branch name, so a job that waited for a runner tested
whatever the branch pointed at when it started, and reported the result on the older commit. Check
out the event's head SHA instead, for pull requests and merge groups alike.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@craigmichaelmartin
craigmichaelmartin requested a review from a team as a code owner November 25, 2026 13:17
@github-actions github-actions Bot added the no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users. label Nov 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog This PR doesn't include a changeset entry. Is an internal only change not relevant to end users.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant