-
Notifications
You must be signed in to change notification settings - Fork 381
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
fix(github-bot): handle pull_request_review event from fork #3319
base: master
Are you sure you want to change the base?
Conversation
🛠 PR Checks Summary🔴 The pull request head branch must be up-to-date with its base (more info) Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
c09bcd4
to
c53282b
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.
hacky, but LGTM.
summoning the action masters @ajnavarro @sw360cab for a second review
This PR fixes this issue: #3238 (comment)
In summary, the
pull_request_review
event, when emitted from a PR opened from a fork, only allows theGitHub Bot
workflow to run with read-only permissions.This PR addresses this issue by:
GitHub Bot
workflow does not fail in the case of a read-only run, but simply saves the number of the PR to be processed by uploading a file containing the number as an artifact (which is possible even in read-only mode).GitHub Bot Proxy
workflow that monitors all completed runs of theGitHub Bot
through a subscription to theworkflow_run
event.GitHub Bot
workflow concerns apull_request_review
event, theGitHub Bot Proxy
workflow retrieves the artifact containing the PR number and then re-runs theGitHub Bot
workflow using aworkflow_dispatch
event.GitHub Bot
workflow then runs again, but this time with write permissions, allowing it to update its comment or the status of its CI check, among other things.