Skip to content

Commit ce65ce2

Browse files
authored
Merge branch 'main' into code-guidelines
2 parents 998e421 + 1d1d0f5 commit ce65ce2

25 files changed

+363
-159
lines changed

docs/changelog.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ description: The latest updates and changes to CodeRabbit.
55
sidebar_position: 13
66
---
77

8+
## August 4, 2025
9+
10+
### Model Context Protocol (MCP) Server Integration - Early Access
11+
12+
Pro users can now connect CodeRabbit to your external tools and knowledge bases to provide more contextual code reviews. Our AI automatically pulls relevant information from your documentation, project management tools, and internal wikis to better understand your code changes and business requirements. Connect your custom MCP servers through Settings > Integrations to get reviews and chat conversations that understand your full development context.
13+
14+
## August 1, 2025
15+
16+
### Dark Theme Support for UI App
17+
18+
CodeRabbit app now supports Light, Dark, and System themes. Use the new theme toggle next to your profile to switch modes.
19+
20+
## July 23, 2025
21+
22+
### ⚡️ Unit Test Generation - Beta
23+
24+
CodeRabbit's unit test generation is now available in Beta! Automatically generate comprehensive unit tests for your code changes, ensuring better test coverage and catching edge cases you might miss. Our AI analyzes your code structure and creates tests that follow best practices and your project's testing patterns. Learn more [here](https://docs.coderabbit.ai/finishing-touches/unit-test-generation), or just try it under ✨ Finishing Touches.
25+
826
## July 17, 2025
927

1028
### Enhanced Reporting Capabilities
@@ -244,7 +262,7 @@ import ProPlanNotice from "@site/src/components/ProPlanNotice.mdx"
244262

245263
New and Improved Dashboards to provide more useful feedback such as:
246264

247-
- Avgerage PR Merge Time
265+
- Average PR Merge Time
248266
- Weekly Pull Request Activity
249267
- Number of PRs Reviewed
250268
- Acceptance rate of CodeRabbit Suggestions

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ CodeRabbit works with all programming languages, with varying proficiency based
6363
- Available training data
6464
- Community usage patterns
6565

66-
### Whats the difference between CodeRabbit Code Reviews and CodeRabbit Reports?
66+
### What's the difference between CodeRabbit Code Reviews and CodeRabbit Reports?
6767

6868
CodeRabbit offers two distinct features that serve different roles in your development workflow:
6969

docs/finishing-touches/unit-test-generation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';
1010
```
1111

1212
:::warning
13-
This feature is [experimental](/early-access#experiments).
13+
This feature is in beta.
1414
:::
1515

1616
# Unit Test Generation
1717

1818
Unit Test Generation is part of the [finishing touches](/future-development#finishing-touches).
1919

20-
Unit Test Generation is an Early Access Experimental feature.
21-
2220
## Usage
2321

22+
![Unit Test Generation](/img/finishing-touches/utg.gif)
23+
2424
Once you are done with your pull request and its reviews, you may want to perform finishing touches to your code, such as adding unit tests. You can request CodeRabbit to generate unit tests by typing `@coderabbitai generate unit tests` in a comment under that pull request or by clicking a checkbox under **Generate Unit Tests** in the CodeRabbit Walkthrough.
2525

2626
Once sent, CodeRabbit will perform the following actions:

docs/guides/configuration-overview.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,13 @@ This means that configuration is not merged or inherited - the highest priority
7272

7373
The [Initial configuration guide](/guides/initial-configuration) tours you through several settings that we
7474
recommend that you review after you set up CodeRabbit with your organization.
75+
76+
## Learnings {#learnings}
77+
78+
As a complement to the configuration methods listed above, CodeRabbit keeps an internal database with _learnings_ that it collects about your team's code review preferences, based on your interactions with the CodeRabbit bot over time. CodeRabbit learnings let you fine-tune the ways that CodeRabbit conducts its code reviews in ways that are highly specific to your repositories, and your team's coding styles.
79+
80+
For more information, see [Teach CodeRabbit your review preferences](/guides/learnings).
81+
82+
## What's next {#whats-next}
83+
84+
- [Initial configuration guide](/guides/initial-configuration)

docs/guides/custom-reports.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Contained within the `<pr_details>` tag.
103103
#### Summarized PR Details
104104

105105
- `<pr_description>`: string - Contains the body of your pull request (aka the PR description at the top of the PR page).
106-
- `<file_changes_summary>`: string - Contains a file by file summary of the changes made in the PR in markdown format. This summary is generated by CodeRabbit AI durring the PR review process. This includes several sections for each file that was changed:
106+
- `<file_changes_summary>`: string - Contains a file by file summary of the changes made in the PR in markdown format. This summary is generated by CodeRabbit AI during the PR review process. This includes several sections for each file that was changed:
107107
- `filename`: string - The name of the file that was changed.
108108
- `AI-generated summary of changes`: markdown - An overall summary of the changes made in the file.
109109
- `Alterations to the declarations of exported or public entities`: markdown - A more specific breakdown of the changes made to the file such as exactly what was added, removed, or modified.
@@ -307,9 +307,9 @@ Issues and tickets brings in conversations, descriptions, and comments from Jira
307307

308308
This option gives you the ability to create a report limited only to pull requests containing a "Score Card" or "Score Chart" bot comment from CodeRabbit or other bots. To enable issues and tickets you must include the tag `<pr_score_card>` in your prompt.
309309

310-
> **IMPORTANT:** This will automatically remove any pull requests from your reports if they do not contain a "Score Card" or "Score Chart" bot comment. Using this option without setting up a flow to create these comments will result in `No new pull request activity in the last XYZ hours` errors. Do not enable this option unless you have asked coderabbit to create a "Score Card" thourhg a comment or implimented the "Score Chart" bot comment flow below.
310+
> **IMPORTANT:** This will automatically remove any pull requests from your reports if they do not contain a "Score Card" or "Score Chart" bot comment. Using this option without setting up a flow to create these comments will result in `No new pull request activity in the last XYZ hours` errors. Do not enable this option unless you have asked CodeRabbit to create a "Score Card" through a comment or implemented the "Score Chart" bot comment flow below.
311311
312-
For example you can ask coderabbit to check serveral conditions on a pull request and produce a "Score Chart":
312+
For example, you can ask CodeRabbit to check several conditions on a pull request and produce a "Score Chart":
313313

314314
<details>
315315
<summary>Click to view example User Score Card/Chart Comment:</summary>
@@ -461,7 +461,7 @@ You will create a new chart averaging all the values from various pull requests
461461
- Only include checks for very specific scenarios, such as a specific check failing or using tabs vs spaces.
462462
- Do not use general rules without explaining specifically what they mean. If you add "Insure the pull request follows development best practices" you must define what "development best practices" actually mean or the AI will guess.
463463
- Make one point for each specific check and make sure its a True/False condition.
464-
- Instead of manually commenting on pull requests you can use the [Github Actions Bot](https://github.com/marketplace/actions/create-or-update-comment) to automatically comment on pull requests and trigger coderabbit score card/chart comments by including `@coderabbit` in the comment.
464+
- Instead of manually commenting on pull requests, you can use the [GitHub Actions Bot](https://github.com/marketplace/actions/create-or-update-comment) to automatically comment on pull requests and trigger CodeRabbit score card/chart comments by including `@coderabbitai` in the comment.
465465

466466
## Best Practices
467467

docs/guides/initial-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ For more information, see
5757

5858
### Configure learnings {#learnings}
5959

60-
CodeRabbit learns your team's review preferences by letting you [teach it your preferences in plain language during code reviews](/integrations/knowledge-base#learnings). CodeRabbit remembers these preferences, and applies them to subsequent code reviews in the same repository.
60+
CodeRabbit learns your team's review preferences by letting you [teach it your preferences in plain language during code reviews](/guides/learnings). CodeRabbit remembers these preferences, and applies them to subsequent code reviews in the same repository.
6161

6262
This setting lets you set the scope of which stored learnings that CodeRabbit should apply to its code reviews. For more information, see [Learnings](/reference/configuration#learnings) in the configuration reference.
6363

docs/guides/learnings.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
title: Teach CodeRabbit your review preferences
3+
description: An overview of the CodeRabbit learnings feature.
4+
---
5+
6+
This page describes how you can configure the code-review behavior of CodeRabbit using natural-language
7+
chat.
8+
9+
For a conceptual overview of CodeRabbit configuration methods, see [Configure CodeRabbit](/guides/configuration-overview). For more information about performing code reviews with CodeRabbit, see
10+
[Review pull requests](/guides/code-review-overview).
11+
12+
## About CodeRabbit learnings {#about}
13+
14+
As your team works with CodeRabbit, it learns your team's code-review
15+
preferences based on chat interactions, and adds these preferences
16+
to an internal database that it associates with your Git platform organization. We call these internal records _learnings_.
17+
18+
<div class="video-container">
19+
<iframe src="https://www.youtube.com/embed/Yu0cmmOYA-U?si=WIeOxqPw4ZFFgvlw" title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen></iframe>
20+
</div>
21+
22+
CodeRabbit learnings are flexible, natural-language statements about code-review preferences whose purpose can include the following:
23+
24+
- Special instructions about reviewing particular files.
25+
- Guidance for reviewing all of the files of one repository.
26+
- Code-review preferences that CodeRabbit must apply across all of your organization's repositories.
27+
28+
Every time CodeRabbit prepares to add a comment to a pull request or issue, it loads all of the learnings that it has collected about your organization's code review preferences. CodeRabbit applies these learnings as additional context or instructions for its comment.
29+
30+
CodeRabbit learnings complement the more traditional configuration that you set for your organization and its repositories using the CodeRabbit web interface or [`.coderabbit.yaml` files](/getting-started/configure-coderabbit). Learnings give you a convenient way to quickly set or correct the behavior of CodeRabbit in ways that are highly specific to your team's coding style, or in ways that the CodeRabbit configuration options don't otherwise account for.
31+
32+
You can review and edit your organization's CodeRabbit learnings at any time, as detailed later in this page.
33+
34+
## Add learnings {#add}
35+
36+
To add learnings to the database CodeRabbit keeps about your organization's preferences, communicate
37+
your preferences directly to the appropriate CodeRabbit service account using natural language, in a comment attached to any pull request or issue. For more information about chatting with CodeRabbit using comments, see [CodeRabbit chat](/guides/agent_chat/).
38+
39+
If CodeRabbit decides to create one or more learnings based on a comment, then it makes this explicit in its response to that comment by adding a collapsible section titled **Learnings Added** to its own response comment.
40+
41+
### An example of adding a learning {#example}
42+
43+
Imagine a scenario where CodeRabbit has reviewed a GitHub-based pull request from your team that adds a feature to an authentication middleware library. CodeRabbit has flagged a certain file as needing improvement, attaching this comment to the relevant lines in its review:
44+
45+
> Consider using nested try-catch blocks here to handle different error scenarios more comprehensively.
46+
47+
If this critique disagrees with your team's coding practices specific to try-catch blocks, then you can reply to this CodeRabbit using a comment of your own, addressed to the `@coderabbitai` service account on GitHub:
48+
49+
> @coderabbitai Actually, we've found that nested try-catch blocks make our auth middleware harder to debug in production. We prefer early returns with specific error codes - it's cleaner and our monitoring tools can track them better.
50+
51+
CodeRabbit considers your reply, and decides to make a learning out of it. It acknowledges this in another reply:
52+
53+
> You're absolutely right about the debugging benefits. Early returns with specific error codes do provide better clarity and monitoring capabilities. I'll remember this preference for your authentication middleware. Thank you for the guidance!
54+
55+
CodeRabbit also adds a **Learnings added** section to this comment, making explicit the fact that this chat has modified its future behavior with your team.
56+
57+
CodeRabbit then creates a new learnings record for itself. Along with metadata such as the pull request number, filename, and GitHub user associated with the learning, CodeRabbit adds this self-instructive text to the new record:
58+
59+
> In authentication middleware, prefer returning early with specific error codes rather than nested try-catch blocks. This improves readability and makes error tracking easier in production environments.
60+
61+
### Best practices for new learnings {#best-practices}
62+
63+
When communicating with CodeRabbit during an active code review, you can help make any resulting learnings more specific by replying directly to review comments that CodeRabbit has left on specific files, rather than leaving comments on the overall pull request. This gives CodeRabbit more context when considering feedback, allowing it to create more specific learnings.
64+
65+
## View learnings {#view}
66+
67+
To view the learnings that CodeRabbit has associated with your organization,
68+
follow these steps:
69+
70+
1. Visit [the CodeRabbit web interface](https://app.coderabbit.ai/settings/repositories).
71+
72+
1. In the sidebar, click **Learnings**.
73+
74+
This displays a paged list of all of the learnings associated with your organization, sorted by creation time, newest-first. To see more details about any learnings record, click its text.
75+
76+
### Filter displayed learnings {#filter}
77+
78+
Over time, the learnings that CodeRabbit gathers for your organization can become quite numerous. This can make manually browsing the full list difficult. The CodeRabbit web interface has search and filtering tools to help you find specific learnings, based on the topic of the learning text, or on other metadata.
79+
80+
To filter the displayed learnings by topic or concept, enter that topic or concept into the **Similarity search** field, and set **Top K** to the number of results you want returned. Because this is a vector-based similarity search, the returned learnings don't necessarily contain the exact text of your search terms.
81+
82+
For example, to see the top ten learnings that have to do with error reporting, enter `error reporting` into **Similarity search** and set **Top K** to `10`.
83+
84+
To filter the displayed learnings by repository, user, or file path, click **+ Filters**, and select additional criteria.
85+
86+
### Edit or delete learnings {#edit}
87+
88+
If your account has the **Admin** [CodeRabbit role](/guides/roles) with your organization, then you can freely edit the text of any stored learning, or delete it outright.
89+
90+
To edit or delete a learning, follow these steps:
91+
92+
1. Click the **Action** menu on the learning record, which resembles three dots.
93+
94+
1. Select **Edit** or **Delete**.
95+
96+
## Configure learnings storage and application {#configure}
97+
98+
CodeRabbit has several configuration options that modify the storage and application of learnings.
99+
100+
### Opt out of learnings storage {#opt-out}
101+
102+
CodeRabbit enables learnings by default. To disable learnings, modify one of the following configuration options:
103+
104+
- To disable all CodeRabbit [knowledge base](/integrations/knowledge-base) features for your organization or repository, which includes learnings, enable [the _Opt out_ setting](/reference/configuration#opt-out).
105+
106+
- To disable all CodeRabbit features that require long-term data retention about your organization's use of CodeRabbit—including learnings—disable [the _Data retention_ setting](/reference/configuration#data-retention).
107+
108+
:::warning
109+
Disabling data retention immediately and irrevocably deletes all learnings that CodeRabbit has associated with your organization.
110+
:::
111+
112+
### Specify the scope of applied learnings {#scope}
113+
114+
[The Learnings configuration setting](/reference/configuration#learnings) lets you specify the _scope_ that CodeRabbit applies to all
115+
of the learnings it has collected about your organization. You can set this option to one of the
116+
following values:
117+
118+
- **`auto`**: When reviewing a public repository, CodeRabbit applies only the learnings specific to that repository. When reviewing private repository, CodeRabbit applies all of your organization's learnings. This is the default setting.
119+
- **`global`**: CodeRabbit applies all of your organization's learnings to all code reviews.
120+
- **`local`**: CodeRabbit applies only learnings associated with code reviews' respective repositories.
121+
122+
## What's next {#whats-next}
123+
124+
- [Add review instructions](/guides/review-instructions)

docs/guides/ondemand-reports.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import ProPlanNotice from '@site/src/components/ProPlanNotice.mdx';
1414

1515
This page is about using the CodeRabbit API to generate on-demand reports about your organization's usage of CodeRabbit. For a conceptual overview of reports in CodeRabbit, see [Generate reports](/guides/reports-overview).
1616

17-
If you're new to CodeRabbit's reporting features, then we recommend starting with [Scheduled reports](/guides/scheduled-reports) to understand the available options and capabilities. In almost every scenario we recommend using the **Scheduled Reports** option. The **On-demand Report** does not have any additional benifits from the **Scheduled Reports** and has many limitations.
17+
If you're new to CodeRabbit's reporting features, then we recommend starting with [Scheduled reports](/guides/scheduled-reports) to understand the available options and capabilities. In almost every scenario we recommend using the **Scheduled Reports** option. The **On-demand Report** does not have any additional benefits from the **Scheduled Reports** and has many limitations.
1818

1919
## API Access
2020

docs/guides/reports-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ There are two ways to generate reports:
2626

2727
- **[On-demand Reports](/guides/ondemand-reports)**: If you want to test a report format and produce a single report once, try the "On-demand Reports" Option. You can also generate reports programmatically through our API, but we do not recommend this as the API reporting is in beta. If you want to run an **On-demand Report** more than once then you must use the **Scheduled Reports** option.
2828

29-
In almost every scenario we recommend using the **Scheduled Reports** option. The **On-demand Report** does not have any additional benifits from the **Scheduled Reports** and has many limitations.
29+
In almost every scenario we recommend using the **Scheduled Reports** option. The **On-demand Report** does not have any additional benefits from the **Scheduled Reports** and has many limitations.
3030

3131
## Customize reports using natural language {#customize}
3232

docs/guides/setup-best-practices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Setup and configuration best practices"
3-
description: Best practices for seting up CodeRabbit.
3+
description: Best practices for setting up CodeRabbit.
44
sidebar_label: Setup and configuration
55
---
66

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy