Skip to content

Commit aa099a0

Browse files
committed
change the default example for coderabbit yaml
1 parent 1a89781 commit aa099a0

File tree

1 file changed

+42
-31
lines changed

1 file changed

+42
-31
lines changed

docs/guides/configure-coderabbit.md

+42-31
Original file line numberDiff line numberDiff line change
@@ -24,57 +24,33 @@ and changed as needed:
2424
#### version 2: `Current`
2525

2626
```yaml
27-
language: "ja"
27+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json
28+
language: "en-US"
2829
early_access: false
2930
reviews:
3031
request_changes_workflow: false
3132
high_level_summary: true
3233
poem: true
3334
review_status: true
3435
collapse_walkthrough: false
35-
path_filters:
36-
- "!**/*.xml"
37-
path_instructions:
38-
- path: "**/*.js"
39-
instructions:
40-
"Review the JavaScript code for conformity with the Google JavaScript
41-
style guide, highlighting any deviations."
42-
- path: "tests/**/*"
43-
instructions: |
44-
"Assess the unit test code employing the Mocha testing framework. Confirm that:
45-
- The tests adhere to Mocha's established best practices.
46-
- Test descriptions are sufficiently detailed to clarify the purpose of each test."
4736
auto_review:
4837
enabled: true
4938
ignore_title_keywords:
5039
- "WIP"
5140
- "DO NOT MERGE"
5241
drafts: false
53-
base_branches:
54-
- "develop"
55-
- "feat/.*"
56-
tools:
57-
ast-grep:
58-
rule_dirs:
59-
- "rules"
60-
util_dirs:
61-
- "utils"
62-
packages:
63-
- "ast-grep-essentials"
64-
- "my-awesome-org/my-awesome-package" # public GitHub repository that contains ast-grep rules
6542
chat:
6643
auto_reply: true
6744
```
6845
6946
YAML settings:
7047
7148
1. **`language`**: Set the language for reviews using the ISO language code. For
72-
example, `"fr"` stands for French (default:`en`).
73-
49+
example, `"ja"` configures reviews in Japanese.
7450
2. **`early_access`**: Enroll in the early access program to take advantage of
7551
forthcoming features before their general release (default:`false`).
76-
7752
3. **`reviews`**: Configurations for the code reviews.
53+
7854
- **`request_changes_workflow`**: Enable request changes review workflow for
7955
CodeRabbit reviews. (default: `false`).
8056
- **`high_level_summary`**: CodeRabbit generates a high-level summary of the
@@ -85,11 +61,29 @@ YAML settings:
8561
- **`collapse_walkthrough`**: Collapses the walkthrough comment
8662
(default:`false`).
8763
- **`path_filters`**: Specifies file patterns to exclude or include for a
88-
review, such as `!dist/**` and `src/**.tsx`, using glob notation.
64+
review, such as `!dist/**` and `src/**.tsx`, using glob notation. Example:
65+
```yaml
66+
path_filters:
67+
- "!**/*.xml"
68+
```
8969
- **`path_instructions`**: Provides specific additional guidelines for code
9070
review based on file paths. In the given example, JavaScript files are
9171
singled out for checks against the Google JavaScript style guide. File path
92-
accepts glob pattern
72+
accepts glob pattern. Example:
73+
74+
```yaml
75+
path_instructions:
76+
- path: "**/*.js"
77+
instructions:
78+
"Review the JavaScript code for conformity with the Google JavaScript
79+
style guide, highlighting any deviations."
80+
- path: "tests/**/*"
81+
instructions:
82+
"Assess the unit test code employing the Mocha testing framework.
83+
Test descriptions must be sufficiently detailed to clarify the
84+
purpose of each test."
85+
```
86+
9387
- **`auto_review`**: Manages settings for automated code reviews, such as:
9488
- **`enabled`**: Automated code review (default: `true`).
9589
- **`ignore_title_keywords`**: Review will be ignored if a pull request
@@ -100,7 +94,12 @@ YAML settings:
10094
- **`drafts`**: Determines whether draft pull requests are reviewed
10195
(default: `true`).
10296
- **`base_branches`**: A list of base branches where the reviews will occur
103-
apart from the default branch. Accepts regex pattern.
97+
apart from the default branch. Accepts regex pattern. Example:
98+
```yaml
99+
base_branches:
100+
- "develop"
101+
- "feat/.*"
102+
```
104103
- **`tools`**: Configurations for the tools used in the review.
105104
- **`ast-grep`**: Configurations for the `ast-grep` tool.
106105
- **`rule_dirs`**: The directory name where the custom `ast-grep` rules
@@ -109,6 +108,18 @@ YAML settings:
109108
are stored.
110109
- **`packages`**: A package allows you to share rules across multiple
111110
projects. Essentially, a package is a collection of `ast-grep` rules.
111+
Example:
112+
```yaml
113+
ast-grep:
114+
rule_dirs:
115+
- "rules"
116+
util_dirs:
117+
- "utils"
118+
packages:
119+
- "ast-grep-essentials"
120+
- "my-awesome-org/my-awesome-package" # public GitHub repository that contains ast-grep rules
121+
```
122+
112123
4. **`chat`**: Defines the behavior of CodeRabbit's bot in conversations.
113124
- **`auto_reply`**: The bot automatically replies without the need of the
114125
user tagging it (default: `true`).

0 commit comments

Comments
 (0)