Before you start
- The Configuration source page is available only for GitHub Cloud with CodeRabbit Cloud. Other Git providers, GitHub Enterprise Server and self-hosted CodeRabbit always use Auto.
- To choose between enforcing and setting defaults, see Apply settings to every repository.
Know what a pull request can change
A trusted pull request, from a branch in the same repository, is reviewed with its own.coderabbit.yaml. It can change its own review settings, including risk limits and status check settings. A pull request can also change settings for one review through a command or its description.
See Change settings for one pull request for the commands.
Enforce keys with global overrides
- Open Review > Review settings and select Organization defaults. For an SSO workspace, use Workspace settings.
- Set View mode to Global overrides.
- Write YAML with only the keys to enforce.
- Save. The overrides apply to later reviews.
inheritance: true in the overrides forces inheritance for every repository, whatever its own file says. You canât change global overrides through the API.
Lock the status check settings
To make sure a repository or pull request canât change what theCodeRabbit check reports, pin these keys in global overrides. Set each key to the value you want to enforce.
Pin the configuration branch
By default, CodeRabbit reads a trusted pull requestâs own file. To read the default branch instead:- Open the repositoryâs Configuration source page. An organization admin makes the change.
- Select Default branch.
- Turn off Allow configuration changes from trusted PRs, which is on by default with this option.
- Select Save changes.
Check the result
Post@coderabbitai configuration on a pull request that tries to change an enforced key. The keyâs # Source: comment names Organization global overrides or Workspace global overrides. The Run configuration section of Review info shows the Source mode and branch. See Check which configuration a review used.
Whatâs next
Global overrides
Learn how overrides combine with every other layer.
Choose the configuration branch
Pick Auto, Default branch, or Custom for each repository.
Status check
Configure the check that gates merging.