Allow forks to run benchmarks and comment#1551
Merged
cmdupuis3 merged 1 commit intoJul 8, 2026
Merged
Conversation
Fork PRs get a read-only GITHUB_TOKEN, so the benchmark workflow's inline comment step fails with 403. Split into two workflows: the pull_request job runs benchmarks (read-only) and uploads results + PR number as an artifact; a new workflow_run job posts the comment from the default branch with the repo's write token. The comment job never checks out PR code, keeping the write token safe. Fixes UXARRAY#1547.
Sevans711
approved these changes
Jul 8, 2026
Sevans711
left a comment
Collaborator
There was a problem hiding this comment.
This looks reasonable to me, thank you for making this fix! Though, is there any way to test whether it actually works as intended before merging to main?
It also might be easier to just merge and fix later if it turns out to have any subtle typos. I'm happy to go with whatever you prefer here.
Collaborator
|
Running this on my own PR as a test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fork PRs get a read-only token, so the benchmark workflow's inline comment step fails with 403. This splits it: the
pull_requestjob runs benchmarks (read-only) and uploads the results + PR number as an artifact, and a newworkflow_runjob posts the comment from the default branch with the repo's write token.Fixes #1547.