Skip to content

Commit 64b3808

Browse files
harjotgilltyaga001
authored andcommitted
hide version 1 schema
1 parent ff65901 commit 64b3808

File tree

1 file changed

+148
-95
lines changed

1 file changed

+148
-95
lines changed

docs/guides/customize-coderabbit.md

+148-95
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ show-title: false
2323
<meta name="twitter:description" content="Accelerate Code Reviews with AI" />
2424
</head>
2525

26-
CodeRabbit offers various customization options to tailor the reviews to your specific requirements. Customizations can be
27-
made using one of the below options :
26+
CodeRabbit offers various customization options to tailor the reviews to your
27+
specific requirements. Customizations can be made using one of the below options
28+
:
2829

2930
1. **Customization via CodeRabbit YAML File** _(Recommended)_
3031
2. **Customization via CodeRabbit UI**
@@ -33,122 +34,164 @@ Customization defined in the YAML file overrides the settings in the UI.
3334

3435
#### 1. Customize CodeRabbit using a YAML File[](https://coderabbit.ai/docs/get-started/customize-coderabbit)
3536

36-
You can add a `.coderabbit.yaml` configuration file to your repositories.
37-
Below is a sample YAML file that can be used as a starting point and change as needed:
37+
You can add a `.coderabbit.yaml` configuration file to your repositories. Below
38+
is a sample YAML file that can be used as a starting point and change as needed:
3839

3940
#### version 2: `Current`
4041

4142
```yaml
4243
language: "ja"
4344
early_access: false
4445
reviews:
45-
request_changes_workflow: false
46-
high_level_summary: true
47-
poem: true
48-
review_status: true
49-
collapse_walkthrough: false
50-
path_filters:
51-
- "!**/.xml"
52-
path_instructions:
53-
- path: "**/*.js"
54-
instructions: "Review the JavaScript code for conformity with the Google JavaScript style guide, highlighting any deviations."
55-
- path: "tests/**/*"
56-
instructions: |
57-
"Assess the unit test code employing the Mocha testing framework. Confirm that:
58-
- The tests adhere to Mocha's established best practices.
59-
- Test descriptions are sufficiently detailed to clarify the purpose of each test."
60-
auto_review:
61-
enabled: true
62-
ignore_title_keywords:
63-
- "WIP"
64-
- "DO NOT MERGE"
65-
drafts: false
66-
base_branches:
67-
- "develop"
68-
- "feat/.*"
46+
request_changes_workflow: false
47+
high_level_summary: true
48+
poem: true
49+
review_status: true
50+
collapse_walkthrough: false
51+
path_filters:
52+
- "!**/.xml"
53+
path_instructions:
54+
- path: "**/*.js"
55+
instructions:
56+
"Review the JavaScript code for conformity with the Google JavaScript
57+
style guide, highlighting any deviations."
58+
- path: "tests/**/*"
59+
instructions: |
60+
"Assess the unit test code employing the Mocha testing framework. Confirm that:
61+
- The tests adhere to Mocha's established best practices.
62+
- Test descriptions are sufficiently detailed to clarify the purpose of each test."
63+
auto_review:
64+
enabled: true
65+
ignore_title_keywords:
66+
- "WIP"
67+
- "DO NOT MERGE"
68+
drafts: false
69+
base_branches:
70+
- "develop"
71+
- "feat/.*"
6972
chat:
70-
auto_reply: true
73+
auto_reply: true
7174
```
7275
73-
**Note**: `.coderabbit.yaml` file should be placed at the root directory of the repository.
76+
**Note**: `.coderabbit.yaml` file should be placed at the root directory of the
77+
repository.
7478

7579
Yaml settings:
7680

77-
1. **language**: Set the language for reviews using the ISO language code. For example, `"fr"` stands for French (default:`en`).
81+
1. **language**: Set the language for reviews using the ISO language code. For
82+
example, `"fr"` stands for French (default:`en`).
7883

79-
2. **early_access**: Enroll in the early access program to take advantage of forthcoming features before their general release (default:`false`).
84+
2. **early_access**: Enroll in the early access program to take advantage of
85+
forthcoming features before their general release (default:`false`).
8086

8187
3. **reviews**: Configurations for the code reviews.
82-
- **request_changes_workflow**: Enable Request Changes review workflow for CodeRabbit reviews. (default: `false`).
83-
- **high_level_summary**: CodeRabbit generates a high level summary of the changes (default:`true`).
84-
- **poem**: Indicates whether a creative poem should be included in the review (default:`true`).
85-
- **review_status**: Indicates the status of the review (default:`true`).
86-
- **collapse_walkthrough**: Collapses the walkthrough comment (default:`false`).
87-
- **path_filters**: Specifies file patterns to exclude or include for a review, such as `!dist/**` and `src/**.tsx`, using glob notation.
88-
- **path_instructions**: Provides specific additional guidelines for code review based on file paths. In the given example, JavaScript files are singled out for checks against the Google JavaScript style guide. File path accepts glob pattern
89-
- **auto_review**: Manages settings for automated code reviews, such as:
90-
- **enabled**: Automated code review (default: `true`).
91-
- **ignore_title_keywords**: Review will be ignored if a pull request title contains one of the list of keywords (e.g., `"WIP"`, `"DO NOT MERGE"`).
92-
- **labels**: Review will be triggered if a pull request contains one of the list of labels.
93-
- **drafts**: Determines whether draft pull requests are reviewed (default: `true`).
94-
- **base_branches**: A list of base branches where the reviews will occur apart from the default branch. Accepts regex pattern.
88+
- **request_changes_workflow**: Enable Request Changes review workflow for
89+
CodeRabbit reviews. (default: `false`).
90+
- **high_level_summary**: CodeRabbit generates a high level summary of the
91+
changes (default:`true`).
92+
- **poem**: Indicates whether a creative poem should be included in the
93+
review (default:`true`).
94+
- **review_status**: Indicates the status of the review (default:`true`).
95+
- **collapse_walkthrough**: Collapses the walkthrough comment
96+
(default:`false`).
97+
- **path_filters**: Specifies file patterns to exclude or include for a
98+
review, such as `!dist/**` and `src/**.tsx`, using glob notation.
99+
- **path_instructions**: Provides specific additional guidelines for code
100+
review based on file paths. In the given example, JavaScript files are
101+
singled out for checks against the Google JavaScript style guide. File path
102+
accepts glob pattern
103+
- **auto_review**: Manages settings for automated code reviews, such as:
104+
- **enabled**: Automated code review (default: `true`).
105+
- **ignore_title_keywords**: Review will be ignored if a pull request title
106+
contains one of the list of keywords (e.g., `"WIP"`, `"DO NOT MERGE"`).
107+
- **labels**: Review will be triggered if a pull request contains one of
108+
the list of labels.
109+
- **drafts**: Determines whether draft pull requests are reviewed (default:
110+
`true`).
111+
- **base_branches**: A list of base branches where the reviews will occur
112+
apart from the default branch. Accepts regex pattern.
95113
4. **chat**: Defines the behavior of CodeRabbit's bot in conversations.
96-
- **auto_reply**: The bot automatically replies without the need of the user tagging it ( default: `true` ).
114+
- **auto_reply**: The bot automatically replies without the need of the user
115+
tagging it ( default: `true` ).
97116

98-
Refer: [CodeRabbit Configuration Schema](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json).
117+
Refer:
118+
[CodeRabbit Configuration Schema](https://coderabbit.ai/integrations/coderabbit-overrides.v2.json).
119+
120+
<details>
121+
<summary> version 1 (deprecated) </summary>
99122

100123
#### version 1: `deprecated` (Please use version [version 2](/guides/customize-coderabbit))
101124

102125
```yaml
103126
settings:
104-
# Enables automatic reviewing of draft pull requests.
105-
enable_draft_pr_reviews: true
106-
# Specifies additional base/target branches to be reviewed. Accept regex pattern.
107-
additional_branches_to_be_reviewed:
108-
- "master"
109-
- "yaml/test"
110-
# Disables generation of release notes.
111-
disable_high_level_summary: false
112-
# Specific review instructions for certain file paths. File paths accept glob pattern
113-
path_based_instructions:
114-
- path: "**/*.js"
115-
instructions: "Review the javascript code against the google javascript style guide and point out any mismatches"
116-
- path: "tests/**/*"
117-
instructions:
118-
"Review the following unit test code written using the Mocha test library. Ensure that:
119-
- The code adheres to best practices associated with Mocha.
120-
- Descriptive test names are used to clearly convey the intent of each test."
121-
# Comma separated list of keywords in the title that should be ignored.
122-
ignored_pr_titles: "WIP"
123-
# ISO Code for the review language.
124-
review_language: "en"
125-
# Disables review and other status comments.
126-
disable_review_status: false
127-
# Add walkthrough comment in a collapsible section.
128-
collapse_walkthrough_comment: true
129-
# Disable automatic code reviews for this repository.
130-
disable_review: false
127+
# Enables automatic reviewing of draft pull requests.
128+
enable_draft_pr_reviews: true
129+
# Specifies additional base/target branches to be reviewed. Accept regex pattern.
130+
additional_branches_to_be_reviewed:
131+
- "master"
132+
- "yaml/test"
133+
# Disables generation of release notes.
134+
disable_high_level_summary: false
135+
# Specific review instructions for certain file paths. File paths accept glob pattern
136+
path_based_instructions:
137+
- path: "**/*.js"
138+
instructions:
139+
"Review the javascript code against the google javascript style guide
140+
and point out any mismatches"
141+
- path: "tests/**/*"
142+
instructions:
143+
"Review the following unit test code written using the Mocha test
144+
library. Ensure that: - The code adheres to best practices associated
145+
with Mocha. - Descriptive test names are used to clearly convey the
146+
intent of each test."
147+
# Comma separated list of keywords in the title that should be ignored.
148+
ignored_pr_titles: "WIP"
149+
# ISO Code for the review language.
150+
review_language: "en"
151+
# Disables review and other status comments.
152+
disable_review_status: false
153+
# Add walkthrough comment in a collapsible section.
154+
collapse_walkthrough_comment: true
155+
# Disable automatic code reviews for this repository.
156+
disable_review: false
131157
```
132158

133159
<!-- ![code](./images/ymlrabbit.png) -->
134160

135161
This configuration file consists of the following settings:
136162

137-
1. **enable_draft_pr_reviews**: Set to **false** to disable draft pull request(PR) reviews.
138-
2. **additional_branches_to_be_reviewed**: Define additional branches to be reviewed besides the default branch.
139-
3. **disable_high_level_summary**: If set to **true**, disables high-level summary generation.
140-
4. **path_based_instructions**: Allows you to specify instructions based on file paths. In this example, instructions for Python and JavaScript files are provided, encouraging adherence to the Google style guide.
141-
5. **ignored_pr_titles**: Specifies ignored PR titles, in this case, "WIP" (Work in Progress).
163+
1. **enable_draft_pr_reviews**: Set to **false** to disable draft pull
164+
request(PR) reviews.
165+
2. **additional_branches_to_be_reviewed**: Define additional branches to be
166+
reviewed besides the default branch.
167+
3. **disable_high_level_summary**: If set to **true**, disables high-level
168+
summary generation.
169+
4. **path_based_instructions**: Allows you to specify instructions based on file
170+
paths. In this example, instructions for Python and JavaScript files are
171+
provided, encouraging adherence to the Google style guide.
172+
5. **ignored_pr_titles**: Specifies ignored PR titles, in this case, "WIP" (Work
173+
in Progress).
142174
6. **review_language**: Sets the review language to French ("fr").
143175
7. **disable_poem**: If set to **false**, enables the "poem" feature.
144-
8. **early_access_program**: Determines whether to enable the early access program (set to **false** in this case).
145-
9. **exclude_file_patterns**: Specifies patterns for excluding certain files from review, such as `!dist/**` and `!**.md`.
146-
10. **limit_reviews_by_label**: Limits reviews by label, targeting "first_bug" label reviews.
147-
11. **disable_review**: Totally disables automatic code reviews for the repository.
148-
12. **disable_review_status**: This is the comment posted for each incremental review status. This removes the review status comment. Reviews will still take place. However, optional comments added to the review status will not be posted.
149-
13. **collapse_walkthrough_comment**: Specifies whether to collapse walkthrough comments on the review.
150-
151-
Refer: [CodeRabbit configuration schema](https://coderabbit.ai/integrations/coderabbit-overrides.json).
176+
8. **early_access_program**: Determines whether to enable the early access
177+
program (set to **false** in this case).
178+
9. **exclude_file_patterns**: Specifies patterns for excluding certain files
179+
from review, such as `!dist/**` and `!**.md`.
180+
10. **limit_reviews_by_label**: Limits reviews by label, targeting "first_bug"
181+
label reviews.
182+
11. **disable_review**: Totally disables automatic code reviews for the
183+
repository.
184+
12. **disable_review_status**: This is the comment posted for each incremental
185+
review status. This removes the review status comment. Reviews will still
186+
take place. However, optional comments added to the review status will not
187+
be posted.
188+
13. **collapse_walkthrough_comment**: Specifies whether to collapse walkthrough
189+
comments on the review.
190+
191+
Refer:
192+
[CodeRabbit configuration schema](https://coderabbit.ai/integrations/coderabbit-overrides.json).
193+
194+
</details>
152195

153196
#### 2. Customize CodeRabbit through the UI [](https://coderabbit.ai/docs/get-started#2-customize-coderabbit-through-the-ui-dashboard)
154197

@@ -158,24 +201,34 @@ Reviews can also be customized through the UI under repository settings:
158201

159202
[](../get-started/images/tailor2.png)
160203

161-
**Path based instructions :** Provide additional review guidelines based on the file paths using glob patterns.
204+
**Path based instructions :** Provide additional review guidelines based on the
205+
file paths using glob patterns.
162206

163-
For further guidance please refer this section [Prompt Customization](/guides/prompt-customization)
207+
For further guidance please refer this
208+
section [Prompt Customization](/guides/prompt-customization)
164209

165-
**Language Selection:** Select the natural language in which you want the review feedback. CodeRabbit supports most of the widely used languages. The default language is English.
210+
**Language Selection:** Select the natural language in which you want the review
211+
feedback. CodeRabbit supports most of the widely used languages. The default
212+
language is English.
166213

167-
**Disable High Level Summary:** This allows disabling high level summary added with the pull request description.
214+
**Disable High Level Summary:** This allows disabling high level summary added
215+
with the pull request description.
168216

169217
### Review Filters [](https://coderabbit.ai/docs/get-started#review-filters)
170218

171219
[](../get-started/images/tailor3.png)
172220

173-
**Disable Reviews:** Disables automatic code reviews for the repository. Reviews can be initiated on-demand using CodeRabbit commands.
221+
**Disable Reviews:** Disables automatic code reviews for the repository. Reviews
222+
can be initiated on-demand using CodeRabbit commands.
174223

175-
**Enable Draft Pull request Reviews:** Select whether CodeRabbit should review the draft pull requests.
224+
**Enable Draft Pull request Reviews:** Select whether CodeRabbit should review
225+
the draft pull requests.
176226

177-
**Configure reviews using pull request labels:** Select specific pull request labels for which reviews should occur.
227+
**Configure reviews using pull request labels:** Select specific pull request
228+
labels for which reviews should occur.
178229

179230
**File Pattern:** Include or exclude specific file patterns from the review.
180231

181-
Please note that code reviews commence with new pull requests or incremental commits to existing pull requests once the CodeRabbit app is installed. Should you have any questions or require assistance, our support team is here to help.
232+
Please note that code reviews commence with new pull requests or incremental
233+
commits to existing pull requests once the CodeRabbit app is installed. Should
234+
you have any questions or require assistance, our support team is here to help.

0 commit comments

Comments
 (0)