Skip to content

GH-50370: [CI] Copilot auto-reviews trigger workflow approval requirement on pr_review_trigger.yml#50486

Open
thisisnic wants to merge 1 commit into
apache:mainfrom
thisisnic:GH-503700review
Open

GH-50370: [CI] Copilot auto-reviews trigger workflow approval requirement on pr_review_trigger.yml#50486
thisisnic wants to merge 1 commit into
apache:mainfrom
thisisnic:GH-503700review

Conversation

@thisisnic

@thisisnic thisisnic commented Jul 13, 2026

Copy link
Copy Markdown
Member

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

Copilot AI review requested due to automatic review settings July 13, 2026 07:22
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50370 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you mean it's the workflow not the step?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting changes Awaiting changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants