This guide shows how to combine them so that routine pull requests move quickly and higher-risk ones get human review. The steps use GitHub.
An approval is not a merge
CodeRabbitâs approval counts as one approving review and does nothing else. A pull request can merge only when it meets every GitHub requirement, such as required status checks, other required reviews, code owner reviews, and no merge conflicts. Automatic Approvals does not fix those problems or merge the pull request. Whoever merges it, a person, GitHub auto-merge, or a Triage merge rule, still has to meet the same requirements.Choose a policy
The policies below assume that CodeRabbit is the only bot that submits approving reviews. If other bots approve too, their approvals may count toward the same requirement.
A required approval count does not say who must approve. Two required approvals can always come from two people, so these policies never make CodeRabbitâs approval mandatory. To require a review from a specific team, add code owners and turn on Require review from Code Owners.
CodeRabbit or a person
Use this policy when a clean CodeRabbit review is enough for the pull request to merge. Require one approval in GitHub and turn on Automatic Approvals:.coderabbit.yaml
@coderabbitai approve comment can satisfy the requirement without a completed review of the latest commit or passing Pre-Merge Checks. To stop authors from doing this on their own pull requests, set reviews.allow_author_approval: false. See Approve or resolve on demand.
CodeRabbit plus a person
Use the same CodeRabbit configuration, but require two approvals in GitHub. A CodeRabbit approval then leaves one approval for a teammate. Two people can also approve the pull request without waiting for CodeRabbit.People for higher-risk changes
Require two approvals in GitHub and add a merge risk limit:.coderabbit.yaml
People only
Turn off Automatic Approvals and set the number of required approvals you want. Turning the feature off stops new approvals but leaves CodeRabbitâs existing approvals on open pull requests. Dismiss them before you rely on people-only approval.Configure GitHub
A repository administrator sets the approval requirement in GitHub, separately from CodeRabbit:1
Open the branch rules
In the repository, go to Settings â Rules â Rulesets, then create or edit a branch ruleset and select the branches it protects. For classic branch protection, go to Settings â Branches instead.
2
Require approvals
Turn on Require a pull request before merging, then turn on required approvals and set the count for your policy.
3
Dismiss stale approvals
Turn on Dismiss stale pull request approvals when new commits are pushed, so that approvals do not carry over to changed code. CodeRabbit approves again after it reviews the new commit. Add code owner reviews and required status checks where you need them.
4
Enforce the rule
For a ruleset, set its enforcement status to Active and check its bypass list if the rule should also apply to administrators and automation. For classic branch protection, turn on Do not allow bypassing the above settings. Save the rule.
Automate merging with Triage
Your approval policy decides who must approve a pull request. A Triage merge rule decides which pull requests CodeRabbit merges for you. The two can differ on purpose. For example:- Lower-risk changes need CodeRabbit and one person, and higher-risk changes need two people, as in People for higher-risk changes.
- A Triage rule based on the Merge low-risk changes template merges only a narrower set: open pull requests with low risk and low review effort.
- Higher-risk pull requests are merged deliberately by a person after human review.
Whatâs next
Approval risk limits
Set merge and security risk limits, with overrides for teams and paths.
Triage rules
Merge, close, or fix pull requests automatically when they match conditions you choose.
Automatic Approvals
See exactly when CodeRabbit requests changes and when it approves.