Skip to main content
CodeRabbit reads the repository configuration file from a specific revision for every review. By default, a trusted pull request is reviewed with the file on its own branch. On GitHub Cloud, you can change this with the Configuration source setting.

How Auto picks the file

Auto is the default on every Git provider. So a trusted pull request that adds or changes .coderabbit.yaml is reviewed with that change before it merges. The change affects only that pull request; other pull requests keep their configuration until it merges. The base commit can be older than the current tip of the target branch.

Who counts as trusted

A pull request from a fork is never trusted. For other pull requests, each Git provider decides trust from what it knows about the author: Azure DevOps and Bitbucket have no author roles to check. A branch in the repository can only be pushed by someone with write access, so CodeRabbit trusts every pull request that isn’t from a fork.

Choose a configuration source

Configuration source is available only for GitHub Cloud repositories on CodeRabbit Cloud. GitLab, Bitbucket, Azure DevOps, GitHub Enterprise Server and self-hosted CodeRabbit always use Auto.
Custom reads .coderabbit.yaml or .coderabbit.yml at the root of the named branch.
1

Open the repository's settings

Go to Review > Review settings and select one repository.
2

Open Configuration source

Select Configuration source in the settings index.
3

Choose a source and save

Choose Auto, Default branch or Custom, enter a branch name for Custom, and select Save changes.
Only organization admins can change the source. Other members who can open the repository’s settings can view it. CodeRabbit stores the choice, not your configuration file.

Allow configuration changes from trusted pull requests

With Default branch, Allow configuration changes from trusted PRs is on by default. When a trusted pull request adds, edits, deletes or renames the configuration file, CodeRabbit reviews it with the pull request’s file. Fork and external-contributor pull requests still use the default branch.
An older configuration file that a branch inherited when it was created isn’t a change. With Default branch, CodeRabbit ignores it and reads the default branch.

Compare the sources on one pull request

The feature/search branch was created from main last month, when .coderabbit.yaml set language: es-ES. Since then, main changed it to en-US, and a review-config branch sets fr-FR. The pull request changes only code.

When a saved source is unavailable

When you save Custom, CodeRabbit checks that it can read the branch and that the file is valid. If not, the previous source stays active. If a saved source later becomes unavailable, for example after the branch is deleted, reviews use Auto and show this warning:
The selected configuration source is unavailable or invalid. This review used Auto. Check the repository’s Configuration source settings.
The Source mode line in Run configuration then reads, for example, Auto (fallback from Default branch).

What the configuration source doesn’t change

The configuration source only selects which repository file CodeRabbit loads. It doesn’t change:
  • The repository’s Use organization settings toggle or saved web interface settings.
  • Whether inheritance runs. The inheritance value in the selected file decides that.
  • Global overrides and workspace settings used as defaults, which still apply afterwards.

What’s next

Check which configuration a review used

Read Run configuration to see the source mode, branch, file and commit a review used.

Validate and test a configuration change

Try a configuration change on a pull request before it reaches every review.

Enforce settings teams can't change

Combine a pinned source with global overrides so pull requests can’t rewrite review policy.