Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pr_review_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
# 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.

runs-on: ubuntu-latest
steps:
- name: "Upload PR review Payload"
Expand Down
Loading