fix(ci): handle fork-PR triage commands via workflow_run handoff#3268
Merged
Conversation
issue_comment and pull_request_review get a read-only GITHUB_TOKEN on cross-fork PRs regardless of the workflow's permissions: block, so /ready, /author and /request-review silently no-op'd on contributor PRs (#3235). Split into pr-triage-collect.yml (read-only collector, uploads event payload as artifact) and pr-triage-apply.yml (workflow_run on base ref, write token, applies labels). pull_request_target lifecycle stays in apply.yml directly. Body crosses the boundary via payload/body.txt, not GITHUB_ENV - a forged heredoc terminator can no longer inject NODE_OPTIONS into the github-script step. setLabels is atomic replace-all (list, drop sibling, single setLabels), removing the both-labels terminal state on any interleaving (workflow_run concurrency cannot re-key on PR# before parse). Also: PR_NUMBER validation, draft re-check after pulls.get, latency + Actions-tab note in welcome and CONTRIBUTING.
numinnex
approved these changes
May 15, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3268 +/- ##
============================================
- Coverage 73.87% 73.82% -0.06%
Complexity 943 943
============================================
Files 1193 1193
Lines 108970 108970
Branches 85988 86005 +17
============================================
- Hits 80505 80448 -57
- Misses 25733 25760 +27
- Partials 2732 2762 +30
🚀 New features to boost your workflow:
|
mmodzelewski
approved these changes
May 15, 2026
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.
issue_comment and pull_request_review get a read-only
GITHUB_TOKEN on cross-fork PRs regardless of the workflow's
permissions: block, so /ready, /author and /request-review
silently no-op'd on contributor PRs (#3235).
Split into pr-triage-collect.yml (read-only collector,
uploads event payload as artifact) and pr-triage-apply.yml
(workflow_run on base ref, write token, applies labels).
pull_request_target lifecycle stays in apply.yml directly.
Body crosses the boundary via payload/body.txt, not
GITHUB_ENV - a forged heredoc terminator can no longer
inject NODE_OPTIONS into the github-script step. setLabels
is atomic replace-all (list, drop sibling, single
setLabels), removing the both-labels terminal state on any
interleaving (workflow_run concurrency cannot re-key on PR#
before parse).
Also: PR_NUMBER validation, draft re-check after pulls.get,
latency + Actions-tab note in welcome and CONTRIBUTING.