Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 59f5526

Browse files
Merge branch 'main' into fix/oxlint
2 parents c544388 + bd7aeff commit 59f5526

File tree

11 files changed

+299
-102
lines changed

11 files changed

+299
-102
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/getting-started/quickstart.md

+113-33
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,135 @@
11
---
2-
title: Playing with CodeRabbit
2+
title: Quickstart
33
sidebar_label: Quickstart
4-
description: Get started with CodeRabbit in less than 2 minutes
4+
description: See CodeRabbit in action, using a live GitHub repository.
55
sidebar_position: 1
66
---
77

8-
# Quickstart Guide
8+
# Quickstart
9+
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+
12+
1. Integrate CodeRabbit into a GitHub-based repository that you own.
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+
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+
19+
For a more general overview of CodeRabbit, see [Introduction](/).
920

1021
:::note
11-
Get started with CodeRabbit in three simple steps. No complex configuration needed.
22+
While this tutorial focuses on GitHub, CodeRabbit also works with GitLab, Azure DevOps, and Bitbucket. For more information, see [Supported Git Platforms](/platforms/).
1223
:::
1324

14-
## Steps to Enable CodeRabbit
25+
## Before you begin
1526

16-
### Sign In with GitHub
27+
Create a new, private repository on GitHub. Name the new repository `coderabbit-test`, and let it have otherwise default GitHub settings.
1728

18-
- Visit [coderabbit.ai](https://coderabbit.ai)
19-
- Click "Sign in with GitHub"
20-
- Authorize CodeRabbit
29+
## Integrate CodeRabbit with your GitHub account
2130

22-
![CodeRabbit Login](/img/integrations/login-self-hosted-github.png)
31+
To integrate CodeRabbit with your GitHub account, follow these steps:
2332

24-
### Add Your Repository
33+
1. Visit [the CodeRabbit login page](https://app.coderabbit.ai/login).
34+
1. Click **Login with GitHub**.
35+
1. Click **Authorize coderabbitai**.
2536

26-
- Go to your [Dashboard](https://app.coderabbit.ai/dashboard)
27-
- Click "Add Repositories"
28-
- Select the repositories you want to enable
37+
CodeRabbit takes a moment to set up the integration. After it finishes, the CodeRabbit dashboard appears.
2938

30-
![CodeRabbit Dashboard](/img/getting-started/dashboard-coderabbit.png)
39+
## Add CodeRabbit to your repository
3140

32-
### You're Done 🎉
41+
To add CodeRabbit to your test repository, follow these steps:
3342

34-
- CodeRabbit will automatically start reviewing your Pull Requests
35-
- Default configuration works out of the box
36-
- No additional setup needed
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+
1. If a CodeRabbit **Complete your signup** dialog appears, then fill it out with the requested information before continuing.
3748

38-
## What's Next?
49+
CodeRabbit is now ready to use with your test repository. The next steps demonstrate its core code-review features.
3950

40-
- Watch CodeRabbit
41-
- Here's an example of CodeRabbit in action:
42-
![CodeRabbit PR Review Example](/img/getting-started/pr-examples.png)
43-
- [View live example PR](https://github.com/tyaga001/devtoolsacademy/pull/39)
44-
- [Configure CodeRabbit](/getting-started/configure-coderabbit) (optional)
45-
- [Add custom review instructions](/guides/review-instructions) (optional)
51+
## Let CodeRabbit perform a code review
4652

47-
## Need Help?
53+
The following steps initiate a pull request to add a tiny and somewhat flawed Python library to your repository, triggering analysis and review from CodeRabbit.
4854

49-
- Join our [Discord community](https://discord.gg/coderabbit) for support
50-
- Check out our [FAQ](/faq)
51-
- Contact [support@coderabbit.ai](mailto:support@coderabbit.ai)
55+
Use your usual Git workflow to perform the following steps in the `coderabbit-test` repository:
5256

53-
:::tip
54-
CodeRabbit starts working immediately. You can customize its behavior later when needed.
55-
:::
57+
1. Create a branch named `add-utils`.
58+
59+
1. In that new `add-utils` branch, create a new file called `simple_utils.py`, with the following content:
60+
61+
```python
62+
# simple_utils.py - A tiny utility library
63+
64+
def reverse_string(text):
65+
"""Reverses the characters in a string."""
66+
return text[::-1]
67+
68+
def count_words(sentence):
69+
return len(sentence.split())
70+
71+
def celsius_to_fahrenheit(celsius):
72+
return (celsius * 9/5) + 32
73+
```
74+
75+
1. Commit the added file to the `add-utils` branch. Use any text you want for the commit message.
76+
77+
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.
78+
79+
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:
80+
81+
- If you didn't write a pull request summary, then CodeRabbit adds a new summary to the pull request.
82+
- CodeRabbit posts a comment titled **Walkthrough** containing analysis and commentary about the content of the pull request.
83+
- CodeRabbit attaches a detailed code review to the pull request as another comment.
84+
85+
Part of the review resembles the following screenshot:
86+
87+
![An example code review comment](/img/getting-started/quickstart-comment.png)
88+
89+
This shows that CodeRabbit has noticed some flaws with this Python library, including a lack of docstrings and input validation. The review comment identifies these flaws, and suggests how you might improve them.
90+
91+
## Ask CodeRabbit for more information
92+
93+
After CodeRabbit reviews a pull request, you can converse with it about its review. You can also give CodeRabbit special commands to request it to perform specific functions, such as generating appropriate code changes for you.
94+
95+
1. Post the following as a new GitHub comment attached to the pull request:
96+
97+
```text
98+
@coderabbitai Why do all of these functions need docstrings? Isn't it obvious enough what they do?
99+
```
100+
101+
After a few moments, CodeRabbit posts its reply, explaining its motivations for its recommendation. The reply might resemble the following:
102+
103+
> 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.
104+
>
105+
> 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.
106+
>
107+
> 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?
108+
109+
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.
110+
111+
1. Post the following as another new comment:
112+
113+
```text
114+
@coderabbitai generate docstrings
115+
```
116+
117+
After a few moments, CodeRabbit does the following:
118+
119+
- CodeRabbit creates a new branch, based on `add-utils`.
120+
- CodeRabbit commits changes to the branch that adds suggested docstrings to `add-utils`.
121+
- CodeRabbit opens a new pull request between the new branch and `add-utils`.
122+
123+
## Clean up
124+
125+
Continue experimenting with CodeRabbit in your test repository for as long as you like. When you're finished, you can delete the repository.
126+
127+
You are now ready to add CodeRabbit to other repositories that you own, and let it review some real pull requests.
128+
129+
## What's next
130+
131+
- [Integrate CodeRabbit](/platforms/) with your repositories on GitHub, GitLab, Azure DevOps, or Bitbucket.
132+
- [Configure CodeRabbit](/getting-started/configure-coderabbit) beyond its default settings.
133+
- [Add custom review instructions](/guides/review-instructions).
134+
- [Get support for CodeRabbit](/getting-started/support).
135+
- [Learn more about how CodeRabbit works](/overview/why-coderabbit).

docs/guides/agent_chat.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ CodeRabbit Chat integrates real-time web search capabilities, enabling it to fet
3737

3838
Set `enabled` to false within `web_search` within `knowledge_base` within the config in order to turn this off.
3939

40-
### Code Definition Integration
40+
### Code Graph Analysis Integration
4141

42-
CodeRabbit Chat is capable of taking definitions of code symbols from the symbol graph that CodeRabbit generates from your codebase. The CodeRabbit Chat response will indicate in its responses if it has found relevant symbols and snippets surrounding symbols in your codebase.
42+
CodeRabbit Chat is capable of analyzing definitions of code symbols from the symbol graph it generates from your codebase. CodeRabbit can use these code definitions to enhance context when providing a chat response and review comments. CodeRabbit Chat will indicate in its response if it has found relevant symbols and snippets surrounding those symbols in your codebase.
4343

44-
Set the environment variable `ENABLE_CODE_GRAPH` in self-hosted CodeRabbit instances to turn this feature off.
44+
Set the environment variable `ENABLE_CODE_GRAPH` to false in self-hosted CodeRabbit instances to turn this feature off in self-hosted instances.
4545

4646
### Jira and Linear Integration
4747

docs/overview/introduction.md

+59-31
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,84 @@ description:
99
slug: "/"
1010
---
1111

12-
## What is CodeRabbit?
12+
# Introduction
1313

14-
> **CodeRabbit** is an AI-powered code reviewer that delivers context-aware feedback on pull requests within minutes, reducing the time and effort needed for manual code reviews. It provides a fresh perspective and catches issues that are often missed, enhancing the overall review quality.
14+
This page provides a conceptual introduction to CodeRabbit. For a hands-on tutorial, see [Quickstart](/getting-started/quickstart/).
1515

16-
Developers can interact directly with the bot within the code, offering additional context, asking questions, or even having the bot generate code. Over time, **CodeRabbit** learns from user input and improves its suggestions.
16+
**CodeRabbit** is an AI-powered code reviewer that delivers context-aware feedback on pull requests within minutes, reducing the time and effort needed for manual code reviews. It complements manual reviews by providing a fresh perspective and catching issues that manual reviews often miss, enhancing the overall review quality.
1717

18-
:::tip
19-
See CodeRabbit in action and watch the demo video below to see how it delivers real-time, context-aware feedback on your pull requests in just a few minutes.
20-
:::
18+
Developers can interact directly with the CodeRabbit bot within their existing Git platform's pull request interface to add context, ask questions, or even have the bot generate code. Over time, CodeRabbit learns from user input and improves its suggestions.
2119

2220
<div class="video-container">
2321
<iframe src="https://www.youtube.com/embed/3SyUOSebG7E?si=i0oT9RAnH0PW81lY" 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>
2422
</div>
2523

26-
## Integration with GitHub, GitLab and Azure DevOps
24+
## Core features
2725

28-
> **CodeRabbit** integrates with GitHub, GitLab and Azure DevOps repositories to deliver continuous and incremental reviews for each commit in a pull request (PR) or merge request (MR). Review feedback is automatically sent back to the PR/MR and can be committed directly.
26+
Core CodeRabbit features include the following:
2927

30-
It works via a webhook, monitoring Pull Request (PR) and Merge Request (MR) events. A comprehensive review is performed when a PR or MR is created, and for
31-
incremental commits and comments addressed to the bot. The feedback is then sent directly back to the Pull Request or Merge Request.
28+
- Integrates rapidly with popular Git platforms and workflows.
29+
- Applies dozens of open-source, industry-standard code analyzers to every commit.
30+
- Implements code reviews as familiar pull-request comments.
31+
- Works with contributors through natural-language conversation in comments.
32+
- Learns and adapts to your team's code style and review preferences.
33+
- Provides an observability dashboard of code-contribution activity.
34+
- Practices strong privacy and security, with no retention of analyzed code.
35+
- Offers free use for public repositories, and flexible pricing for private codebases.
3236

33-
![CodeRabbit Code Review Flow showing how AI integrates with GitHub and GitLab for continuous pull request feedback.](/img/about/coderabbit-flow.png "CodeRabbit Code Review Flow")
37+
## Seamless workflow integration
3438

35-
## Data Privacy and Security
39+
CodeRabbit shares its reviews as comments attached to pull requests, using the same Git platform that your team already uses. Further commits in the same pull review prompt CodeRabbit to make further reviews, using the earlier reviews as context.
3640

37-
> **CodeRabbit** does not use data collected from code reviews to train or influence its models. All queries to Large Language Models (LLMs) are ephemeral, with zero retention. No data is shared with third parties.
41+
Each time that it performs a code review, CodeRabbit runs the relevant code changes through [an array of industry-standard code linters, security analyzers, and other tools](/tools/). CodeRabbit synthesizes the output of these tools into its reviews, offering a high-level analysis that can suggest areas for further focus and improvement.
3842

39-
- **Temporary Storage**: Code is temporarily stored in memory during the review process and deleted afterward.
40-
- **Stored Embeddings**: While the code itself isn’t stored, **CodeRabbit** stores embeddings based on chat conversations and workflow systems (Linear, Jira, GitHub/GitLab issues) to improve future reviews.
41-
- **Compliance**: All data is kept confidential, isolated by organization, and complies with **SOC2 Type II** and **GDPR** standards.
43+
Your team can have conversations with CodeRabbit about its reviews by replying to it with follow-up comments on pull requests, asking it questions or making observations about the review using natural language. CodeRabbit continues the conversation appropriately, offering further insights about the code changes, or adjusting its own review style based on feedback.
4244

43-
### Opting Out
45+
### Customizable review preferences
4446

45-
You can opt out of data storage at any time without affecting your access to **CodeRabbit**.
46-
:::warning
47-
However, opting out may reduce the level of personalized review feedback.
48-
:::
47+
As you interact with CodeRabbit through chat, it learns the review preferences of your team, and applies them to all future reviews on a given repository.
4948

50-
## Try CodeRabbit Now
49+
For example, if CodeRabbit uses a linter to suggest that your pull request use four-space indentations, but your team uses a two-space indentation style, then you can reply to CodeRabbit's pull-request comment to tell it exactly that. CodeRabbit acknowledges your feedback and adjusts all of its subsequent reviews with that repository appropriately.
5150

52-
> Ready to experience **CodeRabbit** in action?
51+
For a video introduction to this feature, see [CodeRabbit Learnings](https://www.youtube.com/watch?v=Yu0cmmOYA-U).
5352

54-
:::tip
55-
For open source projects CodeRabbit Pro is **_FREE_**, forever.
53+
If you need to fine-tune CodeRabbit's behavior beyond this, then you can [add a CodeRabbit-specific configuration file](/getting-started/configure-coderabbit) to your repository, or use the CodeRabbit web UI to set further preferences. This file can include [path-based instructions](/guides/review-instructions) for how CodeRabbit should review different files within your codebase.
5654

57-
- No credit card required
58-
- Unlimited public repositories
55+
No matter how you tune and customize CodeRabbit, its default settings make it useful out of the box, able to meaningfully review pull requests within minutes of its introduction to a repository.
5956

60-
:::
57+
### Platform integration options
6158

62-
<div style={{textAlign: 'left', marginTop: '20px'}}>
63-
<a href="https://app.coderabbit.ai/login" className="button button--primary button--lg">Start reviewing PR Now</a>
64-
</div>
59+
CodeRabbit integrates in just a few clicks with many popular Git platforms:
60+
61+
- GitHub, including GitHub Enterprise Server
62+
- GitLab, including self-managed GitLab
63+
- Azure DevOps
64+
- Bitbucket Cloud
65+
66+
In addition, CodeRabbit can integrate with a number of popular workflow systems:
67+
68+
- Jira
69+
- Linear
70+
- CircleCI
71+
72+
## Data privacy and security
73+
74+
CodeRabbit does not use data collected from code reviews to train or influence its models. All queries to large language models (LLMs) are ephemeral, with zero retention. No data is shared with third parties.
75+
76+
- **Temporary Storage**: CodeRabbit temporarily stores your code in memory during the review process, and deletes it afterward.
77+
- **Stored Embeddings**: While CodeRabbit doesn't store your code, it does store embeddings based on chat conversations and workflow systems (Linear, Jira, GitHub/GitLab issues) to improve future reviews.
78+
- **Compliance**: All data is kept confidential, isolated by organization, and complies with SOC2 Type II and GDPR standards.
79+
80+
You can opt out of data storage at any time without affecting your access to CodeRabbit. Opting out might reduce the level of personalized review feedback that CodeRabbit can provide you.
81+
82+
## Flexible pricing, free for public repositories
83+
84+
Public repositories can use the Pro tier of CodeRabbit at no charge, including all of the code-review features described on this page. Rate limits might apply.
85+
86+
For private repositories, a number of pricing tiers are available. These range from a Free tier that offers unlimited code-change summaries, to an Enterprise tier with access to advanced features and SLA support. For more information, see [Pricing](https://www.coderabbit.ai/pricing).
87+
88+
## What's next
89+
90+
- [Quickstart](/getting-started/quickstart/) lets you experience your first CodeRabbit code review first-hand.
91+
92+
- [Why CodeRabbit?](/overview/why-coderabbit) dives further into the philosophies and technologies that drive CodeRabbit.

0 commit comments

Comments
 (0)