You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<strong>Move existing UI configuration to a YAML file?</strong><br/><br/>
30
-
Use the <code>@coderabbitai configuration</code> command on any PR to get the current configuration in a YAML format. You can then copy the configuration to a <code>.coderabbit.yaml</code> file in the root of your repository.
31
-
</div>
32
-
</div>
26
+
:::tip
27
+
28
+
Move existing UI configuration to a YAML file?
29
+
30
+
Use the `@coderabbitai configuration` command on any PR to get the current
31
+
configuration in a YAML format. You can then copy the configuration to a
32
+
`.coderabbit.yaml` file in the root of your repository.
33
+
34
+
:::
33
35
34
36
You can add a `.coderabbit.yaml` configuration file to the root of your
35
37
repositories. For a complete sample `.coderabbit.yaml` file which you can add to your repository and update as needed, see [Configuration file template](/reference/yaml-template).
36
38
37
-
```mdx-code-block
38
-
import YamlEditor from '@site/src/components/YamlEditor/YamlEditor';
39
+
Write your configuration file in the below editor to validate:
Copy file name to clipboardExpand all lines: docs/getting-started/quickstart.md
+39-64Lines changed: 39 additions & 64 deletions
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,17 @@ sidebar_position: 1
10
10
This tutorial gives you a hands-on demonstration of CodeRabbit, using a real, GitHub-based repository. It guides you through the following tasks:
11
11
12
12
1. Integrate CodeRabbit into a GitHub-based repository that you own.
13
-
2. Observe CodeRabbit perform a code review of a pull request that you initiate.
14
-
3. Converse with CodeRabbit about the code review.
15
-
4. Prompt CodeRabbit to generate its own improvements to the pull request.
13
+
1. Observe CodeRabbit perform a code review of a pull request that you initiate.
14
+
1. Converse with CodeRabbit about the code review.
15
+
1. Prompt CodeRabbit to generate its own improvements to the pull request.
16
16
17
17
When you complete this tutorial, you'll have seen CodeRabbit's code-review feature in action, and glimpsed a few of its other AI-driven abilities as well.
18
18
19
19
For a more general overview of CodeRabbit, see [Introduction](/).
While this tutorial focuses on GitHub, CodeRabbit also works with GitLab, Azure DevOps, and Bitbucket. For more information, see <a href="/platforms/">Integrate with Git platforms</a>.
28
-
</div>
29
-
</div>
21
+
:::note
22
+
While this tutorial focuses on GitHub, CodeRabbit also works with GitLab, Azure DevOps, and Bitbucket. For more information, see [Integrate with Git platforms](/platforms/).
23
+
:::
30
24
31
25
## Before you begin
32
26
@@ -37,31 +31,23 @@ Create a new, private repository on GitHub. Name the new repository `coderabbit-
37
31
To integrate CodeRabbit with your GitHub account, follow these steps:
CodeRabbit requests read and write access to your repository in order for its code review, issue management, and pull request generation features to work. CodeRabbit never stores your code. For more information, see <a href="https://trust.coderabbit.ai">the CodeRabbit Trust Center</a>.
61
-
</div>
62
-
</div>
63
-
64
-
5. If a CodeRabbit **Complete your signup** dialog appears, then fill it out with the requested information before continuing.
43
+
1. On the CodeRabbit dashboard, click **Add Repositories**. A GitHub repository-access dialog appears.
44
+
1. Select the **Only select repositories** radio button.
45
+
1. From the **Select repositories** menu, select the `coderabbit-test` repository that you created earlier in this Quickstart.
46
+
1. Click **Install & Authorize**.
47
+
:::note
48
+
CodeRabbit requests read and write access to your repository in order for its code review, issue management, and pull request generation features to work. CodeRabbit never stores your code. For more information, see [the CodeRabbit Trust Center](https://trust.coderabbit.ai).
49
+
:::
50
+
1. If a CodeRabbit **Complete your signup** dialog appears, then fill it out with the requested information before continuing.
65
51
66
52
CodeRabbit is now ready to use with your test repository. The next steps demonstrate its core code-review features.
67
53
@@ -72,7 +58,8 @@ The following steps initiate a pull request to add a tiny and somewhat flawed Py
72
58
Use your usual Git workflow to perform the following steps in the `coderabbit-test` repository:
73
59
74
60
1. Create a branch named `add-utils`.
75
-
2. In that new `add-utils` branch, create a new file called `simple_utils.py`, with the following content:
61
+
62
+
1. In that new `add-utils` branch, create a new file called `simple_utils.py`, with the following content:
76
63
77
64
```python
78
65
# simple_utils.py - A tiny utility library
@@ -88,8 +75,9 @@ Use your usual Git workflow to perform the following steps in the `coderabbit-te
88
75
return (celsius *9/5) +32
89
76
```
90
77
91
-
3. Commit the added file to the `add-utils` branch. Use any text you want for the commit message.
92
-
4. Create a pull request that proposes to merge the `add-utils` branch into the `main` branch. Use any text you want for the pull request message.
78
+
1. Commit the added file to the `add-utils` branch. Use any text you want for the commit message.
79
+
80
+
1. Create a pull request that proposes to merge the `add-utils` branch into the `main` branch. Use any text you want for the pull request message.
93
81
94
82
After a few moments, CodeRabbit responds to the pull request using the `@coderabbitai` GitHub account. It performs the following actions, all of which are visible on the pull request's page on GitHub:
95
83
@@ -109,43 +97,30 @@ After CodeRabbit reviews a pull request, you can converse with it about its revi
109
97
110
98
1. Post the following as a new GitHub comment attached to the pull request:
111
99
112
-
<divclass="custom-chat-bubble">
113
-
<divclass="chat-content">@coderabbitai Why do all of these functions need docstrings? Isn't it obvious enough what they do?</div>
114
-
<buttonclass="copy-button"onclick="navigator.clipboard.writeText('@coderabbitai Why do all of these functions need docstrings? Isn\'t it obvious enough what they do?')"title="Copy text">
After a few moments, CodeRabbit posts its reply, explaining its motivations for its recommendation. The reply might resemble the following:
123
-
124
-
<divclass="custom-blockquote">
125
-
<p>You're right that these functions are quite self-explanatory from their names alone. Docstrings aren't strictly necessary for every function, especially in smaller projects with clear function names.</p>
100
+
```text
101
+
@coderabbitai Why do all of these functions need docstrings? Isn't it obvious enough what they do?
102
+
```
126
103
127
-
<p>While docstrings do provide benefits (IDE tooltips, documentation generation, help for future developers), they can sometimes feel redundant for very straightforward functions. It's ultimately a matter of coding style and project requirements.</p>
104
+
After a few moments, CodeRabbit posts its reply, explaining its motivations for its recommendation. The reply might resemble the following:
128
105
129
-
<p>If you prefer to skip docstrings for obvious utility functions in this project, that's perfectly reasonable. Would you like me to adjust my review approach regarding documentation for this repository?</p>
130
-
</div>
106
+
> You're right that these functions are quite self-explanatory from their names alone. Docstrings aren't strictly necessary for every function, especially in smaller projects with clear function names.
107
+
>
108
+
> While docstrings do provide benefits (IDE tooltips, documentation generation, help for future developers), they can sometimes feel redundant for very straightforward functions. It's ultimately a matter of coding style and project requirements.
109
+
>
110
+
> If you prefer to skip docstrings for obvious utility functions in this project, that's perfectly reasonable. Would you like me to adjust my review approach regarding documentation for this repository?
131
111
132
-
In this case, CodeRabbit is offering to adjust its future behavior when reviewing changes to this repository. Instead, follow the next step to ask CodeRabbit to implement part of its suggestions. 2. Post the following as another new comment:
112
+
In this case, CodeRabbit is offering to adjust its future behavior when reviewing changes to this repository. Instead, follow the next step to ask CodeRabbit to implement part of its suggestions.
If you're not an organization admin, you may need to request approval from your organization administrators to update the permissions.
34
-
</div>
35
-
</div>
27
+
:::note
28
+
If you're not an organization admin, you may need to request approval from your organization administrators to update the permissions.
29
+
:::
36
30
37
31
After accepting the new permissions, CodeRabbit will have the access it needs to function properly. If you continue to experience issues, try refreshing your browser or reaching out to our support team.
Copy file name to clipboardExpand all lines: docs/guides/configuration-overview.md
+5-7Lines changed: 5 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -22,19 +22,19 @@ CodeRabbit include the following:
22
22
- Customize review instructions to meet your specific coding standards.
23
23
- Take advantage of agentic workflows that can speed up your review cycles.
24
24
25
-
## Configuration methods
25
+
## Configuration methods {#methods}
26
26
27
27
You can configure CodeRabbit in several ways, from global organization settings
28
28
down to configuration directives for specific repositories.
29
29
30
-
### Organization settings
30
+
### Organization settings {#org}
31
31
32
32
If you want to apply the same CodeRabbit configuration to all of your organization's repositories, then
33
33
you can manage organizational settings using the CodeRabbit web UI.
34
34
35
35
For more information, see [Set your organization preferences](/guides/organization-settings).
36
36
37
-
<h3id="repo">Repository settings</h3>
37
+
### Repository settings {#repo}
38
38
39
39
If you want to apply separate CodeRabbit configuration to your organization's different repositories, then you can
40
40
manage repository-specific CodeRabbit settings in two ways:
@@ -46,9 +46,7 @@ For more information, see [Set your repository preferences](/guides/repository-s
46
46
47
47
While the web interface provides and easier way to explore the available configuration options for your repository, we recommend using a `.coderabbit.yaml` file [as a best practice](/guides/setup-best-practices#yaml).
48
48
49
-
## Configuration priority
50
-
51
-
<aid="priority"></a>
49
+
## Configuration priority {#priority}
52
50
53
51
CodeRabbit follows a specific hierarchy when determining which configuration settings to use. Understanding this priority system helps you manage your configuration effectively:
54
52
@@ -70,7 +68,7 @@ When a configuration source is active, it completely overrides all lower-priorit
70
68
71
69
This means that configuration is not merged or inherited - the highest priority source takes complete control over all settings.
72
70
73
-
<h2id="initial">Initial configuration</h2>
71
+
## Initial configuration {#initial}
74
72
75
73
The [Initial configuration guide](/guides/initial-configuration) tours you through several settings that we
76
74
recommend that you review after you set up CodeRabbit with your organization.
0 commit comments