Repository navigation
Require two human reviewers on bot-authored pull requests #66
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
Merged
Matt Durak (mattdurak)
merged 1 commit into
master
from
mdurak/mrbot/two-human-reviewers
Aug 3, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| name: Two human reviewers | ||
| # Requires approvals from two distinct humans on bot-authored pull requests, so a PR the agent opened is | ||
| # not merged on the single approval that would normally be the *second* human to look at a change. | ||
| # | ||
| # The logic lives in c-build-tools so every repository shares one definition; see | ||
| # `.github/workflows/two-human-reviewers.yml` there for why this is a workflow rather than a branch rule, | ||
| # and for the `required-approvals` and `exempt-bots` inputs. This repository does not need to reference | ||
| # c-build-tools any other way: a reusable workflow is fetched by Actions from the ref below, and is not a | ||
| # checkout or a submodule. | ||
| # | ||
| # Keep BOTH triggers below. A called workflow's own triggers are ignored, so these are what re-run the | ||
| # gate; drop `pull_request_review` and it evaluates once at open, finds no approvals, and never re-runs | ||
| # when someone approves - leaving the required check failing until an unrelated push happens to re-trigger | ||
| # it. | ||
| # | ||
| # Do not add a required status check for this until the file is on the default branch, or every open pull | ||
| # request will wait forever on a check that cannot run. Use the `workflow_dispatch` below to produce a | ||
| # first result on pull requests that were already open when it landed. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| pr: | ||
| description: PR number to evaluate. | ||
| type: string | ||
| required: true | ||
| pull_request: | ||
| types: [opened, reopened, synchronize, ready_for_review] | ||
| pull_request_review: | ||
| types: [submitted, dismissed] | ||
|
|
||
| # Set here because a called workflow can never hold more permission than its caller. | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| two-human-reviewers: | ||
| uses: Azure/c-build-tools/.github/workflows/two-human-reviewers.yml@master | ||
| with: | ||
| pr: ${{ github.event.pull_request.number || inputs.pr }} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.