Open
Fix re-request-review workflow for fork-originated PRs (privilege separation)#10286
Conversation
✅ Deploy Preview for velero canceled.
|
Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
Co-authored-by: kaovilai <11228024+kaovilai@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix GitHub Actions workflow to re-request maintainer review for forks
Fix re-request-review workflow for fork-originated PRs (privilege separation)
Aug 15, 2026
kaovilai
marked this pull request as ready for review
August 15, 2026 01:35
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
For fork-originated PRs,
GITHUB_TOKENonpull_request_reviewevents is read-only regardless of declared permissions, causing a 403 when callinggithub.rest.pulls.requestReviewers(). The error was also silently swallowed viacore.warning().Changes
auto_assign_prs.yml— replaces the failingre-request-reviewjob with a lightweightrecord-pr-numberjob that writes the PR number to an artifact. PR number is passed via env variable (not direct expression interpolation) to prevent shell injection. Preserves existingpull_request_targetauto-assignment behavior unchanged..github/workflows/re_request_review.yml(new) — privilegedworkflow_runworkflow triggered after the above completes successfully:/^\d+$/before use — artifact is treated as untrusted input, no PR code is checked out or executedsubmitted_at, fold by user, checkAPPROVED)requestReviewersonly when approval count is below thresholdcore.setFailed()on API errors — failures are no longer silentactions: read+pull-requests: writePlease indicate you've done the following:
make new-changelog) or comment/kind changelog-not-requiredon this PR.site/content/docs/main.