Skip to content

Commit d25553a

Browse files
Merge branch 'main' into readme
2 parents 305fd0e + bd7aeff commit d25553a

23 files changed

+2174
-136
lines changed

.github/workflows/node.js.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
cache: pnpm
2727
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
2828
- run: pnpm run build
29+
env:
30+
API_KEY: ${{ secrets.INKEEP_API_KEY }}
2931
- run: pnpm run lint
3032

3133
fix:

docs/changelog.md

+57-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,61 @@ 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+
28+
## April 14, 2025
29+
30+
### Shopify CLI Integration & Bitbucket Cloud Reporting
31+
32+
We're excited to announce two significant updates:
33+
34+
#### Shopify CLI Integration
35+
36+
We've added support for [Shopify CLI](https://docs.coderabbit.ai/tools/shopify-cli), a powerful tool for validating and analyzing Shopify themes and apps. This integration helps ensure your Shopify projects follow best practices by:
37+
38+
- Validating Liquid syntax and theme requirements
39+
- Checking app extension configurations
40+
- Identifying performance bottlenecks
41+
- Ensuring accessibility standards
42+
- Detecting security vulnerabilities
43+
44+
#### Bitbucket Cloud Scheduled Reporting
45+
46+
Our reporting capabilities now extend to Bitbucket Cloud! You can now:
47+
48+
- Schedule automated reports for your Bitbucket Cloud repositories
49+
- Generate customized summaries of team performance
50+
- Track PR review metrics
51+
- Deliver reports via Email, Slack, Microsoft Teams, or Discord
52+
53+
## April 11 2025
54+
55+
### Agent Chat
56+
57+
```mdx-code-block
58+
<ProPlanNotice />
59+
```
60+
61+
We're thrilled to introduce agentic planning on GitHub for CodeRabbit chat as Generally Available for Pro users. This enhancement lets you make more advanced requests that span multiple files. Just add a review or issue comment on any pull request, or issue comment on an issue, issue tagging `@coderabbitai` along with your natural language request for a code change, and the chat will develop a plan for complex modifications. Upon reviewing the plan and getting your consent, CodeRabbit will emit a stacked PR, commit or copyable snippet to your PR or issue for those code changes.
62+
863
## April 8, 2025
964

1065
### New Static Analysis Tools
@@ -14,7 +69,7 @@ We've expanded our static analysis capabilities with two new tools:
1469
- **OXC**: A high-performance JavaScript/TypeScript linter written in Rust.
1570
- **Prisma Lint**: A dedicated linter for Prisma schema files to help enforce consistent conventions and best practices.
1671

17-
Both tools can be configured through their respective config files or through CodeRabbit's settings page. See our [tools documentation](https://docs.coderabbit.ai/tools/tools) for more details.
72+
Both tools can be configured through their respective config files or through CodeRabbit's settings page. See our [tools documentation](https://docs.coderabbit.ai/tools/) for more details.
1873

1974
## April 1, 2025
2075

@@ -29,7 +84,7 @@ In the review status message. It is automatically enabled for all users.
2984

3085
### Automatically Run a Web Query to Include Latest Information
3186

32-
CodeRabbit now performs Web Queries automatically to include the most recent publicly available information — even if it wasnt included in the latest LLM update. This feature is enabled by default for all users, and you may notice it being used in review comments and chat responses.
87+
CodeRabbit now performs Web Queries automatically to include the most recent publicly available information — even if it wasn't included in the latest LLM update. This feature is enabled by default for all users, and you may notice it being used in review comments and chat responses.
3388

3489
Web Queries allow CodeRabbit to fetch the latest documentation and external content to improve the accuracy and relevance of its output. You can disable this feature by setting web_search: false in your knowledge_base settings.
3590

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-
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

+6-4
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,19 @@ Upon being invoked, CodeRabbit processes your request and responds with the nece
2929

3030
CodeRabbit Chat can automatically generate scripts in various programming languages (mainly shell scripting) to answer questions about your codebase. If incorrect or non-running or non-germane shell scripts are created, CodeRabbit goes and tries again, and the whole script iteration process will be displayed to you in an Analysis Flow.
3131

32+
All scripts are run in a secure sandboxed execution environment.
33+
3234
### Web Search
3335

3436
CodeRabbit Chat integrates real-time web search capabilities, enabling it to fetch up-to-date information to support its responses. The CodeRabbit Chat response will indicate this if it decides to search the web to answer your query.
3537

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

38-
### Code Definition Integration
40+
### Code Graph Analysis Integration
3941

40-
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.
4143

42-
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.
4345

4446
### Jira and Linear Integration
4547

@@ -65,7 +67,7 @@ Agent chat can be invoked explicitly with the `@coderabbitai plan` command.
6567

6668
CodeRabbit cannot perform further modifications to opened pull requests. From there, it's your turn to checkout the branch and improve it to satisfaction. We believe that this workflow provides a significant headstart to implementing code.
6769

68-
Agentic Chat is currently only available on Github issue, pull request and pull request review comments. Agentic Chat is an early access product currently.
70+
Agentic Chat is currently only available on Github issue, pull request and pull request review comments.
6971

7072
### Help and Feedback
7173

docs/guides/issue-chat.md

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ When [agentic thought chain](./agent_chat.md) is enabled, CodeRabbit will use an
6262

6363
![Agentic Thought Chain Example](../../static/img/guides/agentic-thought-chain.png)
6464

65+
All scripts run in the Agentic Thought Chain are run in a secure sandboxed execution environment.
66+
6567
### Feature Planning Support
6668

6769
Issue chat is particularly valuable during feature planning phases:

docs/guides/review-instructions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ sidebar_position: 2
1111
The guide explains how to add custom review instructions for the entire project.
1212
Also, see the guide on how to [configure CodeRabbit](/getting-started/configure-coderabbit).
1313

14-
### Path-based instructions {#path-based}
14+
## Path-based instructions {#path-based}
1515

1616
This section explains how to add custom code review instructions for the entire
1717
project or specific file paths in your project using glob patterns. Developers

0 commit comments

Comments
 (0)