Skip to content

👷 Add Prettier #126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[{*.yaml,*.yml}]
indent_style = space
File renamed without changes.
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.pnpm-store/
build/
dist/
node_modules/
package-lock.json
pnpm-lock.yaml
4 changes: 4 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
arrowParens: avoid
semi: false
trailingComma: all
useTabs: true
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"davidanson.vscode-markdownlint",
"editorconfig.editorconfig",
"esbenp.prettier-vscode"
]
}
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
}
4 changes: 2 additions & 2 deletions docs/Future Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ These are additional capabilities that can also be reviewed in the same PR to ac

### Finishing Touches

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

#### 1. DocString Review
#### 1. DocString Review

- Automated checks for docstring presence and quality
- AI-powered suggestions for improving documentation
Expand Down
12 changes: 6 additions & 6 deletions docs/about/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ changes.
changed for each file.

> Code suggestions are given in a Diff format, which either
be copied or committed within the pull request with a single click.
> be copied or committed within the pull request with a single click.

![CodeRabbit- Code Review Feedback](/img/about/ReviewFeedback.png)

Expand All @@ -43,11 +43,11 @@ Review status is useful for understanding the auxiliary context of the review.
### 3. Chat with CodeRabbit {#chat-with-coderabbit}

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

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

We support:

Expand Down Expand Up @@ -85,8 +85,8 @@ changes.
### 7. Learnings {#learnings}

- **CodeRabbit** learns from user chat interactions to gain tribal knowledge on your
repositories and organization.
repositories and organization.
- **CodeRabbit** will apply and update these learnings
in future reviews.
in future reviews.

![Learnings from Interactions - CodeRabbit AI](/img/about/learnings.png)
20 changes: 10 additions & 10 deletions docs/about/pricing.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ These are the hourly usage limits for each developer per repository:

## Plan Comparison

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

---

Expand Down
2 changes: 1 addition & 1 deletion docs/guides/review-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ can provide tailored review guidelines based on the file paths. These
instructions are needed only if you want CodeRabbit to follow specific
instructions besides the standard review.

>For example, you may want to enforce a style guide by file types or directories.
> For example, you may want to enforce a style guide by file types or directories.

### Sample Usage

Expand Down
12 changes: 7 additions & 5 deletions docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,25 @@ description:
feedback on pull requests, reducing manual effort in code reviews.
slug: "/"
---

## What is CodeRabbit?

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

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.

:::tip

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

<div class="video-container">
<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>
</div>

## Integration with GitHub, GitLab and Azure DevOps

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

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
incremental commits and comments addressed to the bot. The feedback is then sent directly back to the Pull Request or Merge Request.
Expand All @@ -33,7 +35,7 @@ incremental commits and comments addressed to the bot. The feedback is then sent

## Data Privacy and Security

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

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

## Try CodeRabbit Now

>Ready to experience **CodeRabbit** in action?
> Ready to experience **CodeRabbit** in action?

:::tip
For open source projects CodeRabbit Pro is **_FREE_**, forever.
Expand Down
14 changes: 7 additions & 7 deletions docs/platforms/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ CodeRabbit supports various Git platforms to provide code review for your reposi

## GitHub

| Host | Support |
| ------------------------ | ---------------------------------- |
| GitHub.com | [Supported][login] |
| Host | Support |
| ------------------------ | ---------------------------------------- |
| GitHub.com | [Supported][login] |
| GitHub Enterprise Server | [Supported](github-enterprise-server.md) |

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

## Azure DevOps

| Host | Support |
| ------------------- | ---------------------------------- |
| Azure DevOps | [Supported](azure-devops.md) |
| Azure DevOps Server | [Supported] |
| Host | Support |
| ------------------- | ---------------------------- |
| Azure DevOps | [Supported](azure-devops.md) |
| Azure DevOps Server | [Supported] |

## Bitbucket

Expand Down
23 changes: 12 additions & 11 deletions docs/self-hosted/azure-devops.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
title: Use Self-Hosted CodeRabbit With Azure DevOps
sidebar_label: Azure DevOps
sidebar_label: Azure DevOps
description: Instructions to self-host CodeRabbit and integrate it with Azure DevOps.
sidebar_position: 3
---

## Create a Azure DevOps User

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

## Add User to Projects

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

**Necessary Scopes**:

* `Code` - Full
* `Work Items` - Read, write, and manage
- `Code` - Full
- `Work Items` - Read, write, and manage

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.

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

2. **Add the following webhooks:**
1. Pull request created
2. Pull request updated
3. Pull request commented on

1. Pull request created
2. Pull request updated
3. Pull request commented on

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.

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

:::note

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

:::

Expand Down
66 changes: 33 additions & 33 deletions docs/self-hosted/github.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Use Self-Hosted CodeRabbit With GitHub
sidebar_label: GitHub
sidebar_label: GitHub
description: Instructions to self-host CodeRabbit and integrate it with GitHub.
sidebar_position: 1
---
Expand All @@ -9,38 +9,38 @@ sidebar_position: 1

Set the following Repository permissions:

* Checks: Read-only
* Contents: Read and write
* Commit statuses: Read and write
* Discussions: Read-only
* Issues: Read & write
* Metadata: Read-only
* Pull requests: Read & write
- Checks: Read-only
- Contents: Read and write
- Commit statuses: Read and write
- Discussions: Read-only
- Issues: Read & write
- Metadata: Read-only
- Pull requests: Read & write

Set the following Organization permissions:

* Members: Read-only
- Members: Read-only

Set the following events:

* Meta
* Issue comment
* Issues
* Label
* Public
* Pull request
* Pull request review
* Pull request review comment
* Pull request review thread
* Push
* Release
- Meta
- Issue comment
- Issues
- Label
- Public
- Pull request
- Pull request review
- Pull request review comment
- Pull request review thread
- Push
- Release

## Gather information from the GitHub App

* App ID
* Client ID
* Client Secret
* Webhook Secret
- App ID
- Client ID
- Client Secret
- Webhook Secret

## Prepare an `.env` file

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

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

OAUTH2_ENDPOINT=[<endpoint>]
OAUTH2_ENDPOINT=[<endpoint>]
OAUTH2_CLIENT_ID=[<client-id>]
OAUTH2_CLIENT_SECRET=[<client-secret>]
```

:::note

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

:::

## Pull the CodeRabbit Docker image

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

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

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:

```bash
```bash
docker run --env-file .env --publish 127.0.0.1:8080:8080 <docker-registry>/coderabbit-agent:latest
```

### Verify the image is up

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

```bash
```bash
curl 127.0.0.1:8080/health
```

Expand Down
Loading