Skip to content

Commit 4a68c92

Browse files
add note on config priority (#443)
1 parent 80140c6 commit 4a68c92

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

docs/guides/configuration-overview.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,28 @@ For more information, see [Set your repository preferences](/guides/repository-s
4646

4747
While the web interface provides and easier way to explore the available configuration options for your repository, we recommend using a `.coderabbit.yaml` file [as a best practice](/guides/setup-best-practices#yaml).
4848

49+
## Configuration priority {#priority}
50+
51+
CodeRabbit follows a specific hierarchy when determining which configuration settings to use. Understanding this priority system helps you manage your configuration effectively:
52+
53+
### Priority order (highest to lowest)
54+
55+
1. **Local `.coderabbit.yaml` file of head branch**
56+
2. **Repository settings** (web UI)
57+
3. **Organization settings** (web UI)
58+
59+
### How priority works
60+
61+
- **If you have a local `.coderabbit.yaml` file in your head branch**: All repository and organization settings are ignored. Only the local YAML file configuration is used. Anything not defined in that file uses default settings.
62+
- **If you don't have a local YAML file but have enabled repository settings**: Organization settings are ignored. Only repository settings are used.
63+
- **If you have organization settings and repository settings are disabled**: Only organization settings are used.
64+
65+
### Configuration inheritance
66+
67+
When a configuration source is active, it completely overrides all lower-priority sources. For example, if you set `reviews.tools.github-checks.timeout_ms` to `900000` in organization settings, but you have a local `.coderabbit.yaml` file that doesn't define this setting, CodeRabbit will use the default value of `90000` instead of the organization setting.
68+
69+
This means that configuration is not merged or inherited - the highest priority source takes complete control over all settings.
70+
4971
## Initial configuration {#initial}
5072

5173
The [Initial configuration guide](/guides/initial-configuration) tours you through several settings that we

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy