GH-50370: [CI] Copilot auto-reviews trigger workflow approval requirement on pr_review_trigger.yml#50486
GH-50370: [CI] Copilot auto-reviews trigger workflow approval requirement on pr_review_trigger.yml#50486thisisnic wants to merge 1 commit into
Conversation
|
|
There was a problem hiding this comment.
Pull request overview
Adjusts the “Label when reviewed” GitHub Actions workflow to avoid running (and thus avoid unnecessary manual approvals) when the review author is a bot user, aligning with the reported Copilot auto-review friction in issue #50370.
Changes:
- Adds a job-level
if:guard to skip runs for bot-authored pull request reviews.
| # workflow. We trigger a new workflow run which will have permissions to add labels. | ||
| label-when-reviewed: | ||
| name: "Label PRs when reviewed" | ||
| if: github.event.review.user.type != 'Bot' |
There was a problem hiding this comment.
we can try but doesn't this still require the manual approval? I would have thought this check is done once the workflow starts executing, hence the permissions have been cleared. To be fair is not entirely clear from the documentation: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request_review
When a first-time contributor submits a pull request to a public repository, a maintainer with write access may need to approve running workflows on the pull request. For more information, see Approving workflow runs from forks.
There was a problem hiding this comment.
My understanding is that this would just prevent the workflow being triggered at all after a bot review, so there wouldn't be anything to approve?
There was a problem hiding this comment.
Oh, you mean it's the workflow not the step?
There was a problem hiding this comment.
The if check is run on the job as part of the workflow but from my understanding for the if to be checked the workflow has to run. I think the approval is for the workflow to even start so this check won't be performed. Again, this is based on my existence knowledge on how this works but I might be mistaken. This should be testable on a fork with copilot enabled.
Rationale for this change
"Approve workflow to run" button always appears after copilot reviews, is annoying
What changes are included in this PR?
Stop the label workflow running upon copilot review
Are these changes tested?
No
Are there any user-facing changes?
No
pr_review_trigger.yml#50370