Skip to content

Fix benchmark comments not posting on fork PRs - #4033

Merged
quaquel merged 2 commits into
mesa:mainfrom
codebreaker32:fix/benchmark-comment-fork-prs
Nov 4, 2026
Merged

quaquel merged 2 commits into
mesa:mainfrom
codebreaker32:fix/benchmark-comment-fork-prs

Conversation

@codebreaker32

Copy link
Copy Markdown
Collaborator

Since #3622, benchmark results aren't posted on fork PRs: workflow_run.pull_requests is empty for forks, so the comment job fails with No pull request found on workflow_run payload. (failed runs).

This looks the PR up with pulls.list using the head owner, branch and SHA from the event payload. Those values come from GitHub, not the artifact, so the #3622 tampering protection is kept. It also updates stale error messages and passes the PR number through env.

workflow_run.pull_requests is always empty when the PR head lives in a
fork, so since mesa#3622 the comment job failed with "No pull request found
on workflow_run payload." on nearly every PR. Look the PR up with
pulls.list using the head owner, branch, and SHA from the event payload
instead. Those values come from GitHub, not from the uploaded artifact,
so the tampering protection from mesa#3622 is kept.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added the ci Release notes label label Nov 4, 2026
@codebreaker32 codebreaker32 added the bug Release notes label label Nov 4, 2026
@codebreaker32 codebreaker32 changed the title Fix/benchmark comment fork prs Fix benchmark comments not posting on fork PRs Nov 4, 2026
Drop error messages that still referred to the workflow_run payload,
collapse the duplicate SHA-match failures into one, use optional
chaining for the head repository lookup, and pass the PR number to the
comment step through env instead of interpolating it into the script.
@codebreaker32
codebreaker32 force-pushed the fix/benchmark-comment-fork-prs branch from f85c747 to 2c353bf Compare November 4, 2026 14:12
@codebreaker32

Copy link
Copy Markdown
Collaborator Author

Tested on codebreaker32#17

@codebreaker32

Copy link
Copy Markdown
Collaborator Author

Hi @quaquel @EwoutH @tpike3 @jackiekazil
Would appreciate if we could merge this soon so that benchmark comments get restored

@quaquel

quaquel commented Nov 4, 2026

Copy link
Copy Markdown
Member

Thanks a lot for figuring this out so quickly and explaining the issue clearly.

@quaquel
quaquel merged commit a9ef010 into mesa:main Nov 4, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Release notes label ci Release notes label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants