Inheritance is disabled by default. You must explicitly enable it by
adding
inheritance: true to your configuration file.Enabling inheritance
Addinheritance: true at the root level of your .coderabbit.yaml file:
- CodeRabbit merges values from the parent configuration level
- If the parent also has
inheritance: true, the chain continues to the grandparent level - The chain stops at the first level where
inheritance:falseor not set
Configuration hierarchy
CodeRabbit resolves configuration from multiple levels. Without inheritance, only the highest-priority source is used. With inheritance enabled, values merge across levels.Cloud/SaaS deployment
| Priority | Source | Location |
|---|---|---|
| 0 (Highest) | Workspace global overrides | CodeRabbit UI - Workspace Settings - Global Overrides (Enterprise workspace customers) |
| 1 | Organization global overrides | CodeRabbit UI - Organization Settings - Global Overrides |
| 2 | Repository YAML | .coderabbit.yaml in the repository |
| 3 | Central YAML | .coderabbit.yaml in coderabbit repository |
| 4 | Repository UI | CodeRabbit UI - Repository Settings |
| 5 | Organization UI | CodeRabbit UI - Organization Settings |
| 6 | Workspace UI | CodeRabbit UI - Workspace Settings (Enterprise workspace customers) |
| 7 (Lowest) | Defaults | CodeRabbit schema defaults |
Self-hosted deployment
How inheritance works
When you enable inheritance, CodeRabbit walks up the configuration hierarchy and merges values. The merge behavior depends on the data type.How the inheritance chain works
- Each level with
inheritance: truemerges with its parent - The chain stops at the first level where
inheritance:falseor unset - Missing configuration levels are skipped automatically
Merge behavior by type
Example
This example demonstrates all three merge behaviors. Repository configuration (.coderabbit.yaml):
coderabbit/.coderabbit.yaml):
The
src/** path instruction from central is excluded because the repository
already defines the same path. Arrays deduplicate using the first available
stable key: path, label, name, id, or key.Verifying inherited configuration
After enabling inheritance, run@coderabbitai configuration on any pull request to see the fully-resolved YAML annotated with source comments. Each setting shows where it came from, so you can trace exactly which level in the merge chain supplied each value. The command identifies these sources:
- Repository YAML β
.coderabbit.yamlin the repository - Central YAML β
.coderabbit.yamlin thecoderabbitrepository - Environment YAML β
YAML_CONFIGenvironment variable (self-hosted only) - Repository UI β CodeRabbit UI repository settings
- Organization UI β CodeRabbit UI organization settings
- Workspace UI β CodeRabbit UI workspace settings (enterprise only)
- Defaults β CodeRabbit schema defaults
- Global overrides β organization or workspace overrides (enterprise only)
@coderabbitai configuration command reference for usage details.
Common use cases
Organization-wide defaults
Set up common settings in your centralcoderabbit repository, then enable inheritance in individual repositories to use those defaults while customizing specific values.
Central configuration (organization/coderabbit/.coderabbit.yaml):
organization/my-repo/.coderabbit.yaml):
Team-specific configurations (GitLab)
GitLabβs nested group structure allows team-specific configurations. Each team can have their owncoderabbit repository with settings that inherit from parent groups.
Related topics
- YAML configuration - Configuration file reference
- Central configuration - Set up organization-wide configuration
- Repository settings - Configuring individual repositories
- Organization settings - Managing organization-level settings