Skip to content

Commit 1d39010

Browse files
authored
👷 Add Prettier (#126)
* 👷 Add Prettier * 🩹 Fix tip in introduction that swallowed the whole page
1 parent 05a7eb7 commit 1d39010

37 files changed

+1001
-990
lines changed

Diff for: .editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = tab
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[{*.yaml,*.yml}]
12+
indent_style = space
File renamed without changes.

Diff for: .prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.pnpm-store/
2+
build/
3+
dist/
4+
node_modules/
5+
package-lock.json
6+
pnpm-lock.yaml

Diff for: .prettierrc.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
arrowParens: avoid
2+
semi: false
3+
trailingComma: all
4+
useTabs: true

Diff for: .vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"davidanson.vscode-markdownlint",
4+
"editorconfig.editorconfig",
5+
"esbenp.prettier-vscode"
6+
]
7+
}

Diff for: babel.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3-
};
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
3+
}

Diff for: docs/Future Development.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ These are additional capabilities that can also be reviewed in the same PR to ac
5050

5151
### Finishing Touches
5252

53-
Finishing touches are about experience that often take developers time away from what they like doing best - coding. But adding finishing touches is crucial and should follow the ontology and taxonomy. We will start by looking into Docstring and expand to various areas to solve pain points for coders and reviewers.
53+
Finishing touches are about experience that often take developers time away from what they like doing best - coding. But adding finishing touches is crucial and should follow the ontology and taxonomy. We will start by looking into Docstring and expand to various areas to solve pain points for coders and reviewers.
5454

55-
#### 1. DocString Review
55+
#### 1. DocString Review
5656

5757
- Automated checks for docstring presence and quality
5858
- AI-powered suggestions for improving documentation

Diff for: docs/about/features.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ changes.
2727
changed for each file.
2828

2929
> Code suggestions are given in a Diff format, which either
30-
be copied or committed within the pull request with a single click.
30+
> be copied or committed within the pull request with a single click.
3131
3232
![CodeRabbit- Code Review Feedback](/img/about/ReviewFeedback.png)
3333

@@ -38,16 +38,17 @@ additional comments generated for each review, and so on.
3838
:::info
3939
Review status is useful for understanding the auxiliary context of the review.
4040
:::
41+
4142
![CodeRabbit- Review Status](/img/about/ReviewStatus.png)
4243

4344
### 3. Chat with CodeRabbit {#chat-with-coderabbit}
4445

4546
- **CodeRabbit** provides conversational capability that allows developers and the
46-
reviewers to ask questions, generate code, and get feedback in the context of
47-
changes. Just comment on the CodeRabbit review to start the conversation.
47+
reviewers to ask questions, generate code, and get feedback in the context of
48+
changes. Just comment on the CodeRabbit review to start the conversation.
4849

4950
- **CodeRabbit** learns from your interactions and gets smarter over time. The more
50-
you chat, the better it gets.
51+
you chat, the better it gets.
5152

5253
We support:
5354

@@ -85,8 +86,8 @@ changes.
8586
### 7. Learnings {#learnings}
8687

8788
- **CodeRabbit** learns from user chat interactions to gain tribal knowledge on your
88-
repositories and organization.
89+
repositories and organization.
8990
- **CodeRabbit** will apply and update these learnings
90-
in future reviews.
91+
in future reviews.
9192

9293
![Learnings from Interactions - CodeRabbit AI](/img/about/learnings.png)

Diff for: docs/about/pricing.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ These are the hourly usage limits for each developer per repository:
7676

7777
## Plan Comparison
7878

79-
| Feature | Free Plan | Pro Plan |
80-
| ----------------------------- | ---------------- | --------------- |
81-
| **Free Trial** | 14-day free trial| 14-day free trial|
82-
| **Private Repos** | Limited access | Unlimited access|
83-
| **Public Repos** | Unlimited access | Unlimited access|
84-
| **Pull Request Summarization** | Included | Included |
85-
| **Line-by-Line Reviews** | Public repos only | All repos |
86-
| **Conversational Bot** | No | Yes |
87-
| **Hourly Usage Limits** | Limited | 150 files/hour, 9 reviews/hour, 50 conversations/hour |
88-
| **Price** | Free forever | $15 per seat/mo |
79+
| Feature | Free Plan | Pro Plan |
80+
| ------------------------------ | ----------------- | ----------------------------------------------------- |
81+
| **Free Trial** | 14-day free trial | 14-day free trial |
82+
| **Private Repos** | Limited access | Unlimited access |
83+
| **Public Repos** | Unlimited access | Unlimited access |
84+
| **Pull Request Summarization** | Included | Included |
85+
| **Line-by-Line Reviews** | Public repos only | All repos |
86+
| **Conversational Bot** | No | Yes |
87+
| **Hourly Usage Limits** | Limited | 150 files/hour, 9 reviews/hour, 50 conversations/hour |
88+
| **Price** | Free forever | $15 per seat/mo |
8989

9090
---
9191

Diff for: docs/guides/delete-account.md

-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ will permanently erase all data associated with your account, including:
2626
### Deleting the CodeRabbit Account via the UI
2727

2828
:::info
29-
3029
Only accounts where the user has admin access will be deleted.
31-
3230
:::
3331

3432
Sign into your CodeRabbit account and navigate to the **Subscription** page.

Diff for: docs/guides/review-instructions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ can provide tailored review guidelines based on the file paths. These
1919
instructions are needed only if you want CodeRabbit to follow specific
2020
instructions besides the standard review.
2121

22-
>For example, you may want to enforce a style guide by file types or directories.
22+
> For example, you may want to enforce a style guide by file types or directories.
2323
2424
### Sample Usage
2525

Diff for: docs/introduction.md

+6-5
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ description:
88
feedback on pull requests, reducing manual effort in code reviews.
99
slug: "/"
1010
---
11+
1112
## What is CodeRabbit?
1213

13-
>**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+
> **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.
1415
1516
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.
1617

1718
:::tip
18-
> 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.
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.
1920
:::
2021

2122
<div class="video-container">
@@ -24,7 +25,7 @@ Developers can interact directly with the bot within the code, offering addition
2425

2526
## Integration with GitHub, GitLab and Azure DevOps
2627

27-
>**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.
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.
2829
2930
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
3031
incremental commits and comments addressed to the bot. The feedback is then sent directly back to the Pull Request or Merge Request.
@@ -33,7 +34,7 @@ incremental commits and comments addressed to the bot. The feedback is then sent
3334

3435
## Data Privacy and Security
3536

36-
>**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.
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.
3738
3839
- **Temporary Storage**: Code is temporarily stored in memory during the review process and deleted afterward.
3940
- **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.
@@ -48,7 +49,7 @@ However, opting out may reduce the level of personalized review feedback.
4849

4950
## Try CodeRabbit Now
5051

51-
>Ready to experience **CodeRabbit** in action?
52+
> Ready to experience **CodeRabbit** in action?
5253
5354
:::tip
5455
For open source projects CodeRabbit Pro is **_FREE_**, forever.

Diff for: docs/platforms/platforms.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ CodeRabbit supports various Git platforms to provide code review for your reposi
99

1010
## GitHub
1111

12-
| Host | Support |
13-
| ------------------------ | ---------------------------------- |
14-
| GitHub.com | [Supported][login] |
12+
| Host | Support |
13+
| ------------------------ | ---------------------------------------- |
14+
| GitHub.com | [Supported][login] |
1515
| GitHub Enterprise Server | [Supported](github-enterprise-server.md) |
1616

1717
## GitLab
@@ -23,10 +23,10 @@ CodeRabbit supports various Git platforms to provide code review for your reposi
2323

2424
## Azure DevOps
2525

26-
| Host | Support |
27-
| ------------------- | ---------------------------------- |
28-
| Azure DevOps | [Supported](azure-devops.md) |
29-
| Azure DevOps Server | [Supported] |
26+
| Host | Support |
27+
| ------------------- | ---------------------------- |
28+
| Azure DevOps | [Supported](azure-devops.md) |
29+
| Azure DevOps Server | [Supported] |
3030

3131
## Bitbucket
3232

Diff for: docs/self-hosted/azure-devops.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: Use Self-Hosted CodeRabbit With Azure DevOps
3-
sidebar_label: Azure DevOps
3+
sidebar_label: Azure DevOps
44
description: Instructions to self-host CodeRabbit and integrate it with Azure DevOps.
55
sidebar_position: 3
66
---
77

88
## Create a Azure DevOps User
99

10-
* **Username**: Set the username to "CodeRabbit" for easier identification (optional).
11-
* **Profile Image**: Use the CodeRabbitAI logo for the user image (optional).
10+
- **Username**: Set the username to "CodeRabbit" for easier identification (optional).
11+
- **Profile Image**: Use the CodeRabbitAI logo for the user image (optional).
1212

1313
## Add User to Projects
1414

@@ -20,8 +20,8 @@ Generate a personal access token for the CodeRabbit user to be added in the `.en
2020

2121
**Necessary Scopes**:
2222

23-
* `Code` - Full
24-
* `Work Items` - Read, write, and manage
23+
- `Code` - Full
24+
- `Work Items` - Read, write, and manage
2525

2626
Consult official CodeRabbitAI documentation for a detailed [guide](https://docs.coderabbit.ai/platforms/azure-devops#generating-a-personal-access-token) on creating personal access tokens.
2727

@@ -30,9 +30,10 @@ Consult official CodeRabbitAI documentation for a detailed [guide](https://docs.
3030
1. **Navigate to project's Service Hooks Page**: Go to the service hooks configuration page in the desired Azure DevOps project.
3131

3232
2. **Add the following webhooks:**
33-
1. Pull request created
34-
2. Pull request updated
35-
3. Pull request commented on
33+
34+
1. Pull request created
35+
2. Pull request updated
36+
3. Pull request commented on
3637

3738
3. **Add Webhook URL**: Enter the URL pointing to the CodeRabbit service, followed by `/azure_webhooks` (e.g., `http://127.0.0.1:8080/azure_webhooks`) for each webhook.
3839

@@ -86,9 +87,9 @@ LINEAR_PAT=[<linear-personal-access-token>]
8687

8788
:::note
8889

89-
* If you are using Azure OpenAI, verify that the model deployment names are in the .env file.
90-
* Values marked with [] are not optional to provide.
91-
* You can generate `CODERABBIT_API_KEY` from CodeRabbit UI -> Organizations Settings -> API Keys.
90+
- If you are using Azure OpenAI, verify that the model deployment names are in the .env file.
91+
- Values marked with [] are not optional to provide.
92+
- You can generate `CODERABBIT_API_KEY` from CodeRabbit UI -> Organizations Settings -> API Keys.
9293

9394
:::
9495

Diff for: docs/self-hosted/github.md

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Use Self-Hosted CodeRabbit With GitHub
3-
sidebar_label: GitHub
3+
sidebar_label: GitHub
44
description: Instructions to self-host CodeRabbit and integrate it with GitHub.
55
sidebar_position: 1
66
---
@@ -9,38 +9,38 @@ sidebar_position: 1
99

1010
Set the following Repository permissions:
1111

12-
* Checks: Read-only
13-
* Contents: Read and write
14-
* Commit statuses: Read and write
15-
* Discussions: Read-only
16-
* Issues: Read & write
17-
* Metadata: Read-only
18-
* Pull requests: Read & write
12+
- Checks: Read-only
13+
- Contents: Read and write
14+
- Commit statuses: Read and write
15+
- Discussions: Read-only
16+
- Issues: Read & write
17+
- Metadata: Read-only
18+
- Pull requests: Read & write
1919

2020
Set the following Organization permissions:
2121

22-
* Members: Read-only
22+
- Members: Read-only
2323

2424
Set the following events:
2525

26-
* Meta
27-
* Issue comment
28-
* Issues
29-
* Label
30-
* Public
31-
* Pull request
32-
* Pull request review
33-
* Pull request review comment
34-
* Pull request review thread
35-
* Push
36-
* Release
26+
- Meta
27+
- Issue comment
28+
- Issues
29+
- Label
30+
- Public
31+
- Pull request
32+
- Pull request review
33+
- Pull request review comment
34+
- Pull request review thread
35+
- Push
36+
- Release
3737

3838
## Gather information from the GitHub App
3939

40-
* App ID
41-
* Client ID
42-
* Client Secret
43-
* Webhook Secret
40+
- App ID
41+
- Client ID
42+
- Client Secret
43+
- Webhook Secret
4444

4545
## Prepare an `.env` file
4646

@@ -98,26 +98,26 @@ JIRA_PAT=[<jira-personal-access-token>]
9898

9999
LINEAR_PAT=[<linear-personal-access-token>]
100100

101-
OAUTH2_ENDPOINT=[<endpoint>]
101+
OAUTH2_ENDPOINT=[<endpoint>]
102102
OAUTH2_CLIENT_ID=[<client-id>]
103103
OAUTH2_CLIENT_SECRET=[<client-secret>]
104104
```
105105

106106
:::note
107107

108-
* If you are using Azure OpenAI, verify that the model deployment names are in the .env file.
109-
* Values marked with [] are optional to provide.
110-
* For `GITHUB_APP_PEM_FILE`, flatten the PEM file by replacing newlines with `\n`.
111-
* For `GITHUB_HOSTNAME`, use GitHub Enterprise server's hostname, for example, “github.acme-inc.com”
112-
* You can generate `CODERABBIT_API_KEY` from CodeRabbit UI -> Organizations Settings -> API Keys.
108+
- If you are using Azure OpenAI, verify that the model deployment names are in the .env file.
109+
- Values marked with [] are optional to provide.
110+
- For `GITHUB_APP_PEM_FILE`, flatten the PEM file by replacing newlines with `\n`.
111+
- For `GITHUB_HOSTNAME`, use GitHub Enterprise server's hostname, for example, “github.acme-inc.com”
112+
- You can generate `CODERABBIT_API_KEY` from CodeRabbit UI -> Organizations Settings -> API Keys.
113113

114114
:::
115115

116116
## Pull the CodeRabbit Docker image
117117

118118
Using the credentials file shared with you, first authenticate and then pull the image.
119119

120-
```bash
120+
```bash
121121
cat coderabbit.json | docker login -u _json_key --password-stdin us-docker.pkg.dev
122122
docker pull <docker-registry>/coderabbit-agent:latest
123123
```
@@ -126,15 +126,15 @@ docker pull <docker-registry>/coderabbit-agent:latest
126126

127127
You can choose to host it on a server, serverless function, or a container environment and expose the port “8080”. Run the Docker image with the equivalent of the following command on the platform of your choice, replacing the “.env” file with the path to your “.env” file:
128128

129-
```bash
129+
```bash
130130
docker run --env-file .env --publish 127.0.0.1:8080:8080 <docker-registry>/coderabbit-agent:latest
131131
```
132132

133133
### Verify the image is up
134134

135135
You can query `/health` endpoint to verify that the coderabbit-agent service is up and running.
136136

137-
```bash
137+
```bash
138138
curl 127.0.0.1:8080/health
139139
```
140140

0 commit comments

Comments
 (0)