Skip to content

Commit 7edc5df

Browse files
author
Howon Lee
committed
Merge branch 'main' into howon/sahil-ask
2 parents 8c82db0 + ecb1e95 commit 7edc5df

File tree

7 files changed

+118
-42
lines changed

7 files changed

+118
-42
lines changed

docs/changelog.md

+20
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ description: The latest updates and changes to CodeRabbit.
55
sidebar_position: 13
66
---
77

8+
## April 19, 2025
9+
10+
### Docstring Path Instructions
11+
12+
You can now provide path-based instructions for the generation of docstring in `.coderabbit.yaml`.
13+
14+
Example:
15+
16+
```yaml
17+
code_generation:
18+
docstrings:
19+
path_instructions:
20+
- path: "**/*.ts"
21+
instructions: |
22+
End all docstrings with a notice that says "Auto-generated by CodeRabbit.".
23+
Do not omit the closing tags; the docstring must be valid.
24+
```
25+
26+
See the [docstrings documentation](/finishing-touches/docstrings#path-instructions) for more details.
27+
828
## April 14, 2025
929
1030
### Shopify CLI Integration & Bitbucket Cloud Reporting

docs/finishing-touches/docstrings.md

+14
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ CodeRabbit cannot perform further modifications to opened pull requests. From th
3333

3434
This feature has been rigorously tested and is now available for all Pro plan users. Additionally, you can provide feedback about this feature on [Discord](https://discord.com/channels/1134356397673414807/1317286905557287022).
3535

36+
## Path Instructions
37+
38+
You can customize the generated docstrings by providing instructions based on file paths in your `.coderabbit.yaml`. The `path` is a [minimatch](https://github.com/isaacs/minimatch) pattern.
39+
40+
```yaml
41+
code_generation:
42+
docstrings:
43+
path_instructions:
44+
- path: "**/*.ts"
45+
instructions: |
46+
End all docstrings with a notice that says "Auto-generated by CodeRabbit.".
47+
Do not omit the closing tags; the docstring must be valid.
48+
```
49+
3650
## Supported software forges
3751
3852
These software forges are supported:

docs/self-hosted/azure-devops.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,17 @@ LLM_PROVIDER=azure-openai
6464
LLM_TIMEOUT=360000
6565
AZURE_OPENAI_ENDPOINT=<azure-openai-endpoint>
6666
AZURE_OPENAI_API_KEY=<key>
67-
## it is recommended to use gpt-4o-mini, o3-mini, and o1 deployments.
68-
AZURE_GPT4OMINI_DEPLOYMENT_NAME=<gpt-4o-mini-deployment-name>
69-
AZURE_O3MINI_DEPLOYMENT_NAME=<o3-mini-deployment-name>
70-
AZURE_O1_DEPLOYMENT_NAME=<o1-deployment-name>
71-
# optionally, you can swap o3-mini with o1-mini
72-
AZURE_O1MINI_DEPLOYMENT_NAME=[<o1-mini-deployment-name>]
67+
## it is recommended to deploy gpt-4.1-mini, o4-mini, o3 deployments, gpt-4.1 (optionally).
68+
AZURE_GPT41MINI_DEPLOYMENT_NAME=<gpt-4.1-mini-deployment-name>
69+
AZURE_O4MINI_DEPLOYMENT_NAME=<o4-mini-deployment-name>
70+
AZURE_O3_DEPLOYMENT_NAME=<o3-deployment-name>
71+
AZURE_GPT41_DEPLOYMENT_NAME=[<gpt-4.1-deployment-name>]
72+
# optionally, deploy gpt-4o-mini instead of gpt-4.1-mini
73+
AZURE_GPT4OMINI_DEPLOYMENT_NAME=[<gpt-4o-mini-deployment-name>]
74+
# optionally, deploy o3-mini instead of o4-mini
75+
AZURE_O3MINI_DEPLOYMENT_NAME=[<o3-mini-deployment-name>]
76+
# optionally, deploy o1 instead of o3
77+
AZURE_O1_DEPLOYMENT_NAME=[<o1-deployment-name>]
7378

7479
# OAuth2 Configuration (optional)
7580
# This will use client_credentials flow to get an access token,
@@ -107,8 +112,11 @@ AZURE_DEVOPS_BOT_USERNAME=<bot-user-username>
107112
CODERABBIT_LICENSE_KEY=<license-key>
108113

109114
CODERABBIT_API_KEY=<coderabbitai-api-key>
110-
ENABLE_LEARNINGS=[true]
111115
ENABLE_METRICS=[true]
116+
ENABLE_LEARNINGS=[true]
117+
# if using CodeRabbit's learnings, also provide the following
118+
# For example, s3://bucket/path/to/database, gs://bucket/path/to/database, etc.
119+
OBJECT_STORE_URI=[<object-store-uri>]
112120

113121
JIRA_HOST=[<jira-host-url>]
114122
JIRA_PAT=[<jira-personal-access-token>]

docs/self-hosted/bitbucket.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,17 @@ LLM_PROVIDER=azure-openai
5656
LLM_TIMEOUT=360000
5757
AZURE_OPENAI_ENDPOINT=<azure-openai-endpoint>
5858
AZURE_OPENAI_API_KEY=<key>
59-
## it is recommended to use gpt-4o-mini, o3-mini, and o1 deployments.
60-
AZURE_GPT4OMINI_DEPLOYMENT_NAME=<gpt-4o-mini-deployment-name>
61-
AZURE_O3MINI_DEPLOYMENT_NAME=<o3-mini-deployment-name>
62-
AZURE_O1_DEPLOYMENT_NAME=<o1-deployment-name>
63-
# optionally, you can swap o3-mini with o1-mini
64-
AZURE_O1MINI_DEPLOYMENT_NAME=[<o1-mini-deployment-name>]
59+
## it is recommended to deploy gpt-4.1-mini, o4-mini, o3 deployments, gpt-4.1 (optionally).
60+
AZURE_GPT41MINI_DEPLOYMENT_NAME=<gpt-4.1-mini-deployment-name>
61+
AZURE_O4MINI_DEPLOYMENT_NAME=<o4-mini-deployment-name>
62+
AZURE_O3_DEPLOYMENT_NAME=<o3-deployment-name>
63+
AZURE_GPT41_DEPLOYMENT_NAME=[<gpt-4.1-deployment-name>]
64+
# optionally, deploy gpt-4o-mini instead of gpt-4.1-mini
65+
AZURE_GPT4OMINI_DEPLOYMENT_NAME=[<gpt-4o-mini-deployment-name>]
66+
# optionally, deploy o3-mini instead of o4-mini
67+
AZURE_O3MINI_DEPLOYMENT_NAME=[<o3-mini-deployment-name>]
68+
# optionally, deploy o1 instead of o3
69+
AZURE_O1_DEPLOYMENT_NAME=[<o1-deployment-name>]
6570

6671
# OAuth2 Configuration (optional)
6772
# This will use client_credentials flow to get an access token,
@@ -102,8 +107,11 @@ BITBUCKET_SERVER_BOT_USERNAME=<bot-user-username>
102107
CODERABBIT_LICENSE_KEY=<license-key>
103108

104109
CODERABBIT_API_KEY=<coderabbitai-api-key>
105-
ENABLE_LEARNINGS=[true]
106110
ENABLE_METRICS=[true]
111+
ENABLE_LEARNINGS=[true]
112+
# if using CodeRabbit's learnings, also provide the following
113+
# For example, s3://bucket/path/to/database, gs://bucket/path/to/database, etc.
114+
OBJECT_STORE_URI=[<object-store-uri>]
107115

108116
JIRA_HOST=[<jira-host-url>]
109117
JIRA_PAT=[<jira-personal-access-token>]

docs/self-hosted/github.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,17 @@ LLM_PROVIDER=azure-openai
6767
LLM_TIMEOUT=360000
6868
AZURE_OPENAI_ENDPOINT=<azure-openai-endpoint>
6969
AZURE_OPENAI_API_KEY=<key>
70-
## it is recommended to use gpt-4o-mini, o3-mini, and o1 deployments.
71-
AZURE_GPT4OMINI_DEPLOYMENT_NAME=<gpt-4o-mini-deployment-name>
72-
AZURE_O3MINI_DEPLOYMENT_NAME=<o3-mini-deployment-name>
73-
AZURE_O1_DEPLOYMENT_NAME=<o1-deployment-name>
74-
# optionally, you can swap o3-mini with o1-mini
75-
AZURE_O1MINI_DEPLOYMENT_NAME=[<o1-mini-deployment-name>]
70+
## it is recommended to deploy gpt-4.1-mini, o4-mini, o3 deployments, gpt-4.1 (optionally).
71+
AZURE_GPT41MINI_DEPLOYMENT_NAME=<gpt-4.1-mini-deployment-name>
72+
AZURE_O4MINI_DEPLOYMENT_NAME=<o4-mini-deployment-name>
73+
AZURE_O3_DEPLOYMENT_NAME=<o3-deployment-name>
74+
AZURE_GPT41_DEPLOYMENT_NAME=[<gpt-4.1-deployment-name>]
75+
# optionally, deploy gpt-4o-mini instead of gpt-4.1-mini
76+
AZURE_GPT4OMINI_DEPLOYMENT_NAME=[<gpt-4o-mini-deployment-name>]
77+
# optionally, deploy o3-mini instead of o4-mini
78+
AZURE_O3MINI_DEPLOYMENT_NAME=[<o3-mini-deployment-name>]
79+
# optionally, deploy o1 instead of o3
80+
AZURE_O1_DEPLOYMENT_NAME=[<o1-deployment-name>]
7681

7782
# OAuth2 Configuration (optional)
7883
# This will use client_credentials flow to get an access token,
@@ -120,8 +125,11 @@ GITHUB_APP_PEM_FILE=<flattened-pem-file>
120125
CODERABBIT_LICENSE_KEY=<license-key>
121126

122127
CODERABBIT_API_KEY=<coderabbitai-api-key>
123-
ENABLE_LEARNINGS=[true]
124128
ENABLE_METRICS=[true]
129+
ENABLE_LEARNINGS=[true]
130+
# if using CodeRabbit's learnings, also provide the following
131+
# For example, s3://bucket/path/to/database, gs://bucket/path/to/database, etc.
132+
OBJECT_STORE_URI=[<object-store-uri>]
125133

126134
JIRA_HOST=[<jira-host-url>]
127135
JIRA_PAT=[<jira-personal-access-token>]

docs/self-hosted/gitlab.md

+15-7
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,17 @@ LLM_PROVIDER=azure-openai
6262
LLM_TIMEOUT=360000
6363
AZURE_OPENAI_ENDPOINT=<azure-openai-endpoint>
6464
AZURE_OPENAI_API_KEY=<key>
65-
## it is recommended to use gpt-4o-mini, o3-mini, and o1 deployments.
66-
AZURE_GPT4OMINI_DEPLOYMENT_NAME=<gpt-4o-mini-deployment-name>
67-
AZURE_O3MINI_DEPLOYMENT_NAME=<o3-mini-deployment-name>
68-
AZURE_O1_DEPLOYMENT_NAME=<o1-deployment-name>
69-
# optionally, you can swap o3-mini with o1-mini
70-
AZURE_O1MINI_DEPLOYMENT_NAME=[<o1-mini-deployment-name>]
65+
## it is recommended to deploy gpt-4.1-mini, o4-mini, o3 deployments, gpt-4.1 (optionally).
66+
AZURE_GPT41MINI_DEPLOYMENT_NAME=<gpt-4.1-mini-deployment-name>
67+
AZURE_O4MINI_DEPLOYMENT_NAME=<o4-mini-deployment-name>
68+
AZURE_O3_DEPLOYMENT_NAME=<o3-deployment-name>
69+
AZURE_GPT41_DEPLOYMENT_NAME=[<gpt-4.1-deployment-name>]
70+
# optionally, deploy gpt-4o-mini instead of gpt-4.1-mini
71+
AZURE_GPT4OMINI_DEPLOYMENT_NAME=[<gpt-4o-mini-deployment-name>]
72+
# optionally, deploy o3-mini instead of o4-mini
73+
AZURE_O3MINI_DEPLOYMENT_NAME=[<o3-mini-deployment-name>]
74+
# optionally, deploy o1 instead of o3
75+
AZURE_O1_DEPLOYMENT_NAME=[<o1-deployment-name>]
7176

7277
# OAuth2 Configuration (optional)
7378
# This will use client_credentials flow to get an access token,
@@ -111,8 +116,11 @@ GITLAB_WEBHOOK_SECRET=<webhook-secret-key>
111116
CODERABBIT_LICENSE_KEY=<license-key>
112117

113118
CODERABBIT_API_KEY=<coderabbitai-api-key>
114-
ENABLE_LEARNINGS=[true]
115119
ENABLE_METRICS=[true]
120+
ENABLE_LEARNINGS=[true]
121+
# if using CodeRabbit's learnings, also provide the following
122+
# For example, s3://bucket/path/to/database, gs://bucket/path/to/database, etc.
123+
OBJECT_STORE_URI=[<object-store-uri>]
116124

117125
JIRA_HOST=[<jira-host-url>]
118126
JIRA_PAT=[<jira-personal-access-token>]

static/schema/schema.v2.json

+24-14
Original file line numberDiff line numberDiff line change
@@ -830,19 +830,6 @@
830830
"additionalProperties": false,
831831
"default": {},
832832
"description": "Configuration for Shopify Theme Check to ensure theme quality and best practices"
833-
},
834-
"rustClippy": {
835-
"type": "object",
836-
"properties": {
837-
"enabled": {
838-
"type": "boolean",
839-
"default": true,
840-
"description": "Enable Clippy | Clippy is a linter for Rust code. | v1.86.0"
841-
}
842-
},
843-
"additionalProperties": false,
844-
"default": {},
845-
"description": "Clippy is a linter for Rust code."
846833
}
847834
},
848835
"additionalProperties": false,
@@ -1110,10 +1097,33 @@
11101097
],
11111098
"default": "en-US",
11121099
"description": "Set the language for docstrings by using the corresponding ISO language code."
1100+
},
1101+
"path_instructions": {
1102+
"type": "array",
1103+
"items": {
1104+
"type": "object",
1105+
"properties": {
1106+
"path": {
1107+
"type": "string",
1108+
"description": "File path glob pattern. Example: **/*.js"
1109+
},
1110+
"instructions": {
1111+
"type": "string",
1112+
"maxLength": 20000,
1113+
"description": "Provides additional guidelines for docstring generation based on file paths."
1114+
}
1115+
},
1116+
"required": ["path", "instructions"],
1117+
"additionalProperties": false
1118+
},
1119+
"default": [],
1120+
"description": "Path Instructions | Provide additional guidelines for docstring generation based on file paths."
11131121
}
11141122
},
11151123
"additionalProperties": false,
1116-
"default": {},
1124+
"default": {
1125+
"path_instructions": []
1126+
},
11171127
"description": "Settings related to the generation of docstrings."
11181128
}
11191129
},

0 commit comments

Comments
 (0)