What the rule checks#
In branch protection, the rule "requires all comments on the pull request to be resolved before it can be merged to a protected branch." Require conversation resolution before merging The REST reference for rulesets describes required_review_thread_resolution more narrowly: "All conversations on code must be resolved before a pull request can be merged." Create a repository ruleset Treat it as a rule about review threads on the diff.
Resolving is a click, and the docs say who may make it: "You can resolve a conversation in a pull request if you opened the pull request or if you have write access to the repository where the pull request was opened." The author can therefore resolve a reviewer's thread without replying. The Conversations menu on the Files changed tab shows "which conversations are unresolved, resolved, and outdated." Resolving conversations
A fictional question that an approval would have buried#
Suppose a fictional repository, acme/invoices, requires one approval on main. Kim opens a pull request that converts invoice totals to a new money type. Lee leaves an inline comment on the conversion function: "What happens when currency is null for invoices imported before 2024?" Lee does not request changes, because the rest looks right.
Kim pushes two more commits that touch other files. Max, a second reviewer, approves. CI is green, because the test fixtures all have a currency. Without the rule, the pull request can merge with Lee's question still open in the timeline, and the first null currency in production answers it.
With the rule on, the merge box blocks on one unresolved conversation. Kim opens the Conversations menu, finds Lee's thread, and has to do something with it. If she replies "Imported invoices get XXX from the backfill; added a test" and pushes the test, the rule has done its job. If she clicks resolve without replying, the merge unblocks and the question is just as unanswered as before. The rule cannot tell those apart.
What it does not catch#
The rule counts threads. It does not read them. A resolved thread with no reply satisfies it, and so does a reply that does not answer the question. It also only sees questions asked as threads on the code. A concern raised in the pull request description, a chat message or a reviewer's head is outside it.
It does not substitute for a blocking review either. A reviewer who needs to see the fix before the merge should request changes, which holds the pull request until that reviewer approves. Resolving a thread only needs the author.
The cost when bots open the threads#
Nothing in the docs exempts threads opened by automated reviewers. GitHub's Copilot code review docs say its comments "behave like review comments from humans. You can add reactions to them, comment on them, resolve them and hide them." They also warn that on re-review, "Copilot may repeat the same comments again, even if they have been dismissed with the 'Resolve conversation' button." Using GitHub Copilot code review
Under the rule, a bot that leaves a dozen style suggestions adds a dozen threads the author must close before merge, and a bot that re-reviews every push can reopen the same work. Authors respond by resolving in bulk without reading, which is the habit that defeats the rule for human threads too. If your bot reviewers produce findings a linter could own, move those to the linter; the guide to findings already covered by lint covers that split. The review attention guide covers the broader budget.
Decide and configure#
Turn the rule on for repositories where reviewers ask questions inline instead of requesting changes, and where an unanswered question has shipped before. Leave it off where automated reviewers leave many threads and you cannot reduce them, because the rule will mostly measure how fast authors click resolve.
When you turn it on, write the convention down where authors will see it, such as the contributing guide or the pull request template:
- Reply in the thread before resolving: the answer, the commit that addresses it, or the issue that tracks it.
- Resolve your own thread as the reviewer when you are satisfied, if you have write access.
- For a suggestion outside the pull request's scope, open an issue from the comment and link it in the reply, as the docs suggest for out-of-scope feedback.
- Request changes instead of commenting when the merge should wait for you specifically.
In a ruleset, set required_review_thread_resolution in the pull_request rule:
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 1,
"dismiss_stale_reviews_on_push": false,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_review_thread_resolution": true
}
}
In a classic branch protection rule, select Require conversation resolution before merging. If a reviewer is unavailable and their review, not their thread, is what blocks, the guide to dismissing a changes-requested review covers that case.