ci: use pull_request_target so auto-assign works on fork PRs - #161
Merged
Merged
Conversation
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.
What
Switch the
auto-assign-prjob from thepull_requesttrigger topull_request_target.Why
PRs opened from forks get a read-only
GITHUB_TOKENunderpull_request, regardless of the job'spermissions:block. The assign call is rejected, so the job fails on every fork PR, for example #160:pull_request_targetruns in the context of the base repo with a write-capable token, so assignment works for fork PRs too.Safety
The usual
pull_request_targetrisk is checking out and running untrusted PR code with a privileged token. This job never does that. It has no checkout step and only callspozil/auto-assign-issueto assignmodem7. Nothing from the PR is executed.Notes
if:condition is updated to match the new event name.github.actor != 'renovate[bot]'guard is unchanged.