What the approval count does#
The count is a number of approving reviews from people with write access. GitHub's docs say that with required reviews, "collaborators can only push changes to a protected branch via a pull request that is approved by the required number of reviewers with write permissions." About protected branches In a ruleset, required_approving_review_count takes a value from 0 to 10. Create a repository ruleset
The number says nothing about who the reviewers are. Two approvals from two people who sit next to each other and know the same code satisfy it as well as approvals from an application developer and a database specialist. That is why the useful question is where a second approval should come from, more than whether to require one.
Rulesets can answer that per path. The Required reviewers option lets you "require review or approval from specific teams when a pull request changes certain files or directories," with "up to 15 different teams," and "for each team you can require a certain number of approvals from team members." The team must have write access for its members' approvals to count, and the rule "is not available on user-owned repositories as they do not contain teams." Required reviewers
A fictional migration that one approval let through#
Suppose a fictional repository, acme/ledger, requires one approval on main. Omar opens a pull request that adds a settled_at column to the entries table and backfills it in the same migration, with the application code that reads it. Pia, who knows the ledger code well, reviews the application change, checks the new tests, and approves. CI runs the migration against a test database with a few hundred rows and passes.
On the production table, the backfill runs as one long update inside the migration's transaction. Pia was the right reviewer for the code and the wrong reviewer for the migration, and a second approval from Pia's teammate could easily have read it the same way. A reviewer from the database team reads db/migrations/ with a different question in mind: what does this do to a table of this size while traffic is running?
Raising the repository-wide count to two would have put a second person on this pull request and on every other pull request in the repository, documentation fixes included, without making either of them a database reviewer.
Require the second reviewer by path#
This pull_request rule keeps one approval for the repository and requires one approval from the database team whenever migrations change. The team ID is the numeric ID of the fictional @acme/dba team:
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 1,
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_review_thread_resolution": false,
"required_reviewers": [
{
"reviewer": { "id": 4100001, "type": "Team" },
"minimum_approvals": 1,
"file_patterns": ["db/migrations/**"]
}
]
}
}
Read the rule's documentation before you rely on its pattern matching. The rules page says the file list uses "the same" format "as a standard .gitignore file," with ! negation and patterns "matched in order," while the REST reference says "file patterns use fnmatch syntax." Open a draft pull request that touches a migration and one that does not, and check which teams the merge box asks for. The guide to path-based required reviewers compares this rule with CODEOWNERS.
The docs also do not say whether one approval can count both toward the repository-wide number and toward a team's minimum. If you need two different people on migrations, require one approval each from two teams with no shared members, or test the combination on a draft pull request before you count on it.
What a second approval does not catch#
A second approval adds a second reading. It does not add a test, a load estimate or an environment check. In the ledger example, the database reviewer catches the backfill only because they know to ask about table size; neither approval runs the migration against production volume.
It also does not survive careless re-approval. With stale-approval dismissal on, every late push costs two re-approvals instead of one, and the second is the one most likely to be given without reading the new diff.
The cost of the second approval#
Every required approval is a wait on someone else's queue, and the wait applies to every pull request the rule covers. Two repository-wide approvals double the number of review requests for routine changes and, with dismissal on, double the re-approvals after each push. The guide to review attention covers how that spend competes with the reviews that matter.
The number also grows in ways you do not set directly. When Copilot opens a pull request that is not attributed to a person, the ruleset "requires one more approval than the number you configured," so a repository at two approvals asks for three on those pull requests. Additional approval for unattributed Copilot pull requests
Decide#
Keep the repository-wide count at one for most repositories. Add a required reviewer team for each path whose failures need knowledge the usual reviewers lack: migrations, authentication and authorization code, infrastructure definitions, release workflows. Raise the repository-wide count to two only when every change in the repository carries that kind of risk, such as a repository that holds nothing but production access policy, and expect each pull request to wait for two people when you do.