-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CI/Build] Give PR cleanup job PR write access #10139
[CI/Build] Give PR cleanup job PR write access #10139
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
When I ran this job on my own fork, it had the necessary permissions to edit my own PR. Here, we need to explicitly grant the workflow PR write access. Since we are giving the GITHUB_TOKEN some level of elevated access, it is safer to use `pull_request_event` instead of `pull_request`. The difference is that `pull_request_event` runs in the context of `main` instead of the PR. In other words, a PR will not run this workflow using changes from the PR itself. This prevents a malicious PR from editing this workflow, or a script that it executes, to do something malicious with the github token. Finally, run this on the reopened event, but not synchronize. It's not relevant for sync (new commits being pushed). Signed-off-by: Russell Bryant <rbryant@redhat.com>
f15d153
to
a0c0c43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @russellb
Signed-off-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Isotr0py <2037008807@qq.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: OmerD <omer@run.ai>
Signed-off-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Loc Huynh <jc1da.3011@gmail.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Sumit Dubey <sumit.dubey2@ibm.com>
When I ran this job on my own fork, it had the necessary permissions
to edit my own PR. Here, we need to explicitly grant the workflow PR
write access.
Since we are giving the GITHUB_TOKEN some level of elevated access, it
is safer to use
pull_request_event
instead ofpull_request
. Thedifference is that
pull_request_event
runs in the context ofmain
instead of the PR. In other words, a PR will not run this workflow
using changes from the PR itself. This prevents a malicious PR from
editing this workflow, or a script that it executes, to do something
malicious with the github token.
Signed-off-by: Russell Bryant rbryant@redhat.com