Skip to content

Commit fa093c0

Browse files
committed
chore: add real-world coderabbit config examples for python, typescript, javascript and golang
1 parent 4f7c763 commit fa093c0

6 files changed

+205
-0
lines changed

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This curated list covers the best resources, tutorials, and community content re
99
- [Official Resources](#official-resources)
1010
- [Getting Started](#getting-started)
1111
- [API Reference](#api-reference)
12+
- [Configuration Examples](#configuration-examples)
1213
- [Integration Guides](#integration-guides)
1314
- [Media Coverage](#media-coverage)
1415
- [Video Tutorials](#video-tutorials)
@@ -37,6 +38,61 @@ This curated list covers the best resources, tutorials, and community content re
3738

3839
- [OpenAPI Documentation](https://api.coderabbit.ai/api/swagger/) - Complete Swagger documentation for CodeRabbit's REST API endpoints.
3940

41+
## Configuration Examples
42+
43+
### Enterprise Configuration Example
44+
45+
Explore real-world CodeRabbit configurations from various projects.
46+
47+
```yaml
48+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
49+
language: "en-US"
50+
early_access: false
51+
tone_instructions: 'You are an expert code reviewer in Java, TypeScript, JavaScript, and NodeJS. You work in an enterprise software developer team, providing concise and clear code review advice. You only elaborate or provide detailed explanations when requested.'
52+
reviews:
53+
profile: "chill"
54+
request_changes_workflow: false
55+
high_level_summary: true
56+
poem: true
57+
review_status: true
58+
collapse_walkthrough: false
59+
auto_review:
60+
enabled: true
61+
drafts: false
62+
base_branches: ["pg", "release"]
63+
path_instructions:
64+
- path: "app/client/cypress/**/**.*"
65+
instructions: |
66+
Review the following e2e test code written using the Cypress test library. Ensure that:
67+
- Follow best practices for Cypress code and e2e automation
68+
- Avoid using cy.wait in code
69+
- Avoid using cy.pause in code
70+
- Avoid using agHelper.sleep()
71+
- Use locator variables for locators
72+
- Use data-* attributes for selectors
73+
- Avoid Xpaths, Attributes and CSS path
74+
- Avoid selectors like .btn.submit
75+
- Perform logins via API
76+
- Avoid using it.only
77+
- Use multiple assertions
78+
- Avoid string assertions
79+
- Ensure unique filenames
80+
chat:
81+
auto_reply: true
82+
```
83+
84+
Find more examples in the [`configs/`](configs/) directory, organized by language:
85+
86+
```
87+
configs/
88+
├── javascript/ # JavaScript project configurations
89+
├── typescript/ # TypeScript project configurations
90+
├── python/ # Python project configurations
91+
├── go/ # Go project configurations
92+
└── multi-language/ # Full-stack project configurations
93+
```
94+
95+
4096
## Integration Guides
4197
4298
- [Azure DevOps Integration](https://www.coderabbit.ai/blog/getting-started-with-coderabbit-using-azure-devops) - Guide for integrating with Azure DevOps.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
language: "en"
2+
early_access: false
3+
reviews:
4+
request_changes_workflow: false
5+
high_level_summary: true
6+
poem: false
7+
review_status: true
8+
collapse_walkthrough: true
9+
path_filters:
10+
- "!api/"
11+
path_instructions:
12+
- path: "**/*.go"
13+
instructions: "Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations."
14+
- path: "tests/**/*"
15+
instructions: |
16+
"Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"
17+
- path: "**/*_test.go"
18+
instructions: |
19+
"Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
20+
- path: "**/*.md"
21+
instructions: |
22+
"Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
23+
auto_review:
24+
enabled: true
25+
ignore_title_keywords:
26+
- "WIP"
27+
- "DO NOT MERGE"
28+
drafts: false
29+
base_branches:
30+
- "main"
31+
chat:
32+
auto_reply: true
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
language: "ja"
2+
early_access: false
3+
reviews:
4+
request_changes_workflow: true
5+
high_level_summary: true
6+
poem: false
7+
review_status: false
8+
collapse_walkthrough: false
9+
path_filters:
10+
- "!**/.xml"
11+
path_instructions:
12+
- path: "**/*.js"
13+
instructions: "Review the JavaScript code for conformity with the Google JavaScript style guide, highlighting any deviations."
14+
- path: "tests/**/*"
15+
instructions: |
16+
"Assess the unit test code employing the Mocha testing framework. Confirm that:
17+
- The tests adhere to Mocha's established best practices.
18+
- Test descriptions are sufficiently detailed to clarify the purpose of each test."
19+
auto_review:
20+
enabled: true
21+
ignore_title_keywords:
22+
- "WIP"
23+
- "DO NOT MERGE"
24+
drafts: false
25+
base_branches:
26+
- "main"
27+
chat:
28+
auto_reply: true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: "ja"
2+
early_access: false
3+
reviews:
4+
profile: "assertive"
5+
request_changes_workflow: false
6+
high_level_summary: true
7+
poem: false
8+
review_status: true
9+
collapse_walkthrough: false
10+
path_filters:
11+
- "!.gitignore"
12+
- "!backend/app/db/alembic_*"
13+
path_instructions:
14+
- path: "**/*.py"
15+
instructions:
16+
"Review the Python code for conformity with Ruff linter and formatter.\
17+
Do not review the import path."
18+
auto_review:
19+
enabled: true
20+
ignore_title_keywords:
21+
- "WIP"
22+
- "DO NOT MERGE"
23+
drafts: false
24+
tools:
25+
# デフォルトでONだが効いてるか不明なのであえて明示化
26+
ruff:
27+
enabled: true
28+
chat:
29+
auto_reply: true
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
language: "en-US"
3+
early_access: false
4+
tone_instructions: 'You are an expert code reviewer in Java, TypeScript, JavaScript, and NodeJS. You work in an enterprise software developer team, providing concise and clear code review advice.You only elaborate or provide detailed explanations when requested.'
5+
reviews:
6+
profile: "chill"
7+
request_changes_workflow: false
8+
high_level_summary: true
9+
poem: true
10+
review_status: true
11+
collapse_walkthrough: false
12+
auto_review:
13+
enabled: true
14+
drafts: false
15+
base_branches: ["pg", "release"]
16+
path_instructions:
17+
- path: "app/client/cypress/**/**.*"
18+
instructions: |
19+
Review the following e2e test code written using the Cypress test library. Ensure that:
20+
- Follow best practices for Cypress code and e2e automation.
21+
- Avoid using cy.wait in code.
22+
- Avoid using cy.pause in code.
23+
- Avoid using agHelper.sleep().
24+
- Use locator variables for locators and do not use plain strings.
25+
- Use data-* attributes for selectors.
26+
- Avoid Xpaths, Attributes and CSS path.
27+
- Avoid selectors like .btn.submit or button[type=submit].
28+
- Perform logins via API with LoginFromAPI.
29+
- Perform logout via API with LogOutviaAPI.
30+
- Perform signup via API with SignupFromAPI.
31+
- Avoid using it.only.
32+
- Avoid using after and aftereach in test cases.
33+
- Use multiple assertions for expect statements.
34+
- Avoid using strings for assertions.
35+
- Do not use duplicate filenames even with different paths.
36+
- Avoid using agHelper.Sleep, this.Sleep in any file in code.
37+
chat:
38+
auto_reply: true
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://coderabbit.ai/docs/get-started/customize-coderabbit
2+
3+
language: "ja"
4+
early_access: true
5+
reviews:
6+
request_changes_workflow: false
7+
high_level_summary: true
8+
poem: true
9+
review_status: true
10+
collapse_walkthrough: false
11+
path_filters:
12+
- "!**/.xml"
13+
path_instructions:
14+
- path: "**.ts"
15+
instructions: "Review the TypeScript code for conformity with the Google TypeScript style guide, highlighting any deviations."
16+
auto_review:
17+
enabled: true
18+
ignore_title_keywords:
19+
- ":construction:"
20+
drafts: false
21+
chat:
22+
auto_reply: true

0 commit comments

Comments
 (0)