-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
179 lines (153 loc) · 5 KB
/
Copy path.coderabbit.yaml
File metadata and controls
179 lines (153 loc) · 5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# CodeRabbit Configuration for Python Libs
# https://docs.coderabbit.ai/reference/configuration
#
# CodeRabbit provides AI-powered code reviews for every pull request.
# Philosophy: Complements (not duplicates) CI/CD, pre-commit, and Copilot
# - CI/CD: Runs tests, linters → CodeRabbit: Contextual understanding of changes
# - Pre-commit: Formats code → CodeRabbit: Reviews logic and architecture
# - Copilot: Suggests code → CodeRabbit: Reviews entire PR holistically
language: en-US
# Early access features
early_access: true
# Reviews configuration
reviews:
# Review profile: assertive = more thorough, catches more issues
profile: assertive
auto_review:
enabled: true
drafts: false
base_branches:
- main
- master
- develop
# Request changes workflow - makes reviews actionable
request_changes_workflow: false
# High-level summary - executive overview of changes
high_level_summary: true
high_level_summary_placeholder: "@coderabbitai summary"
# Auto-generate PR titles following conventional commits
auto_title_placeholder: "@coderabbitai title"
auto_title_instructions: |
Use conventional commits format: <type>(<scope>): <description>
Types: feat, fix, docs, refactor, test, chore, perf, ci
Keep descriptions concise and meaningful
# Poem feature - adds a creative touch
poem: true
# Review status
review_status: true
# Collapse walkthrough - false = expanded for visibility
collapse_walkthrough: false
# Sequence diagrams - visualizes complex control flow
sequence_diagrams: true
# Changed files summary
changed_files_summary: true
# Code review effort estimate (1-5 scale)
estimate_code_review_effort: true
# Related issues/PRs - links similar past work
related_issues: true
related_prs: true
# Linked issue assessment - validates PR addresses linked issues
assess_linked_issues: true
# Auto-labeling
suggested_labels: true
auto_apply_labels: true
labeling_instructions:
- label: "python"
instructions: "Apply when changes affect .py files"
- label: "tests"
instructions: "Apply when changes affect files in tests/"
- label: "ci"
instructions: "Apply when changes affect .github/workflows/ files"
- label: "documentation"
instructions: "Apply when changes affect README.md, docs/, or docstrings"
- label: "security"
instructions: "Apply when changes affect authentication, authorization, or security-related code"
- label: "dependencies"
instructions: "Apply when changes affect pyproject.toml or requirements files"
- label: "breaking-change"
instructions: "Apply when changes break backwards compatibility"
# Path filters - skip generated/cached files
path_filters:
- "!**/*.lock"
- "!**/*.min.js"
- "!**/*.min.css"
- "!**/node_modules/**"
- "!**/.venv/**"
- "!**/dist/**"
- "!**/build/**"
- "!**/__pycache__/**"
- "!**/.mypy_cache/**"
- "!**/.pytest_cache/**"
- "!**/.ruff_cache/**"
- "!**/htmlcov/**"
- "!**/.coverage"
# Path-specific instructions
path_instructions:
- path: "src/python_libs/**/*.py"
instructions: |
Review Python source code for:
- Type hints on all function signatures
- Proper error handling with specific exceptions
- Docstrings for public functions and classes
- No hardcoded secrets or credentials
- Adherence to project coding standards (Black, Ruff)
- Security best practices (input validation, SQL injection prevention)
- path: "tests/**/*.py"
instructions: |
Review test files for:
- Comprehensive test coverage of edge cases
- Clear test names describing behavior
- Proper use of fixtures and mocking
- No flaky tests or timing dependencies
- Assertions that clearly explain failures
- path: ".github/workflows/**"
instructions: |
Review GitHub Actions workflows for:
- Security best practices (minimal permissions, pinned actions)
- Proper secret handling
- Efficient caching strategies
- Clear job dependencies
- path: "pyproject.toml"
instructions: |
Review dependency changes for:
- Version constraint appropriateness
- Security implications of new dependencies
- License compatibility
# Finishing touches - suggestions for polish
finishing_touches:
docstrings:
enabled: true
unit_tests:
enabled: true
# Tools - provide inline context during review
tools:
ruff:
enabled: true
gitleaks:
enabled: true
markdownlint:
enabled: true
yamllint:
enabled: true
# Chat configuration
chat:
auto_reply: true
# Knowledge base - learns from codebase
knowledge_base:
opt_out: false
web_search:
enabled: true
learnings:
scope: auto
issues:
scope: auto
jira:
project_keys: []
linear:
team_keys: []
pull_requests:
scope: auto
# Code generation settings
code_generation:
docstrings:
language: en-US