Skip to content

Allow forks to run benchmarks and comment#1551

Merged
cmdupuis3 merged 1 commit into
UXARRAY:mainfrom
rajeeja:rajeeja/allow-fork-benchmark-comment
Jul 8, 2026
Merged

Allow forks to run benchmarks and comment#1551
cmdupuis3 merged 1 commit into
UXARRAY:mainfrom
rajeeja:rajeeja/allow-fork-benchmark-comment

Conversation

@rajeeja

@rajeeja rajeeja commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Fork PRs get a read-only token, so the benchmark workflow's inline comment step fails with 403. This splits it: the pull_request job runs benchmarks (read-only) and uploads the results + PR number as an artifact, and a new workflow_run job posts the comment from the default branch with the repo's write token.

Fixes #1547.

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.
@rajeeja rajeeja requested review from Sevans711 and cmdupuis3 July 8, 2026 18:42
@cmdupuis3 cmdupuis3 added the run-benchmark Run ASV benchmark workflow label Jul 8, 2026

@Sevans711 Sevans711 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cmdupuis3

Copy link
Copy Markdown
Collaborator

Running this on my own PR as a test.

@cmdupuis3 cmdupuis3 merged commit 7c9b487 into UXARRAY:main Jul 8, 2026
26 checks passed
@rajeeja rajeeja moved this to 👀 In review in UXarray Development Jul 8, 2026
@github-project-automation github-project-automation Bot moved this from 👀 In review to ✅ Done in UXarray Development Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-benchmark Run ASV benchmark workflow

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

PR from fork cannot write benchmarking comment

3 participants