Skip to content

Commit

Permalink
Update introduction and CodeRabbit documentation (#64)
Browse files Browse the repository at this point in the history
* Update introduction and CodeRabbit documentation

* Update FAQ documentation

* Update CodeRabbit documentation and remove reference to GitHub Copilot

* Update CodeRabbit documentation and remove reference to GitHub Copilot
  • Loading branch information
hasit authored Jul 17, 2024
1 parent 00de52e commit 3527575
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 31 deletions.
50 changes: 29 additions & 21 deletions docs/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ sidebar_label: FAQs
description: Frequently asked questions about CodeRabbit.
---

### General

#### How accurate is CodeRabbit's review?

Early adoption results for CodeRabbit have been highly promising, demonstrating
Expand All @@ -14,13 +16,13 @@ in reviews.

#### Which programming languages does CodeRabbit support?

CodeRabbit is designed to work with all programming languages. However, the
CodeRabbit is designed to work with all programming languages. The
proficiency of our AI models might vary between languages based on their
popularity and the public availability of training data.

#### Does CodeRabbit store my code?

We do not store your code. The code collected at the time of the review is
We do not store your code. The code repository that is cloned at the time of the review is
disposed of as soon as the review is complete. During the review, there is
complete data isolation of the code being reviewed, and no one from CodeRabbit
or outside has access to the code.
Expand All @@ -38,31 +40,36 @@ click on the organization name in the top-left corner of the CodeRabbit UI.
![Switch Organizations](./images/cr_support_orgs_light.png#gh-light-mode-only)
![Switch Organizations](./images/cr_support_orgs_dark.png#gh-dark-mode-only)

#### Can a CodeRabbit subscription be used across multiple organizations?

Subscription seats are tied to the specific GitHub/GitLab organization under
which they are purchased and cannot be used under another organization.
#### What Large Language Models does CodeRabbit use?

#### Can CodeRabbit review my existing PRs after integrating it?
CodeRabbit currently utilizes OpenAI's `gpt-4-turbo` and `gpt-3.5-turbo`. We're
researching and testing upcoming LLMs to ensure we're offering the most precise
reviews possible.

CodeRabbit will by default only review new PRs or existing PRs which have a new
commit after the app is installed. You can, however, use the
`@coderabbitai review` command on the PR to trigger a review for existing PRs.
### Subscription

#### Who can install CodeRabbit on the repositories?
#### Can a CodeRabbit subscription be used across multiple organizations?

You need to be a GitHub/GitLab admin to add the repositories.
Subscription seats are tied to the specific GitHub/GitLab organization under
which they are purchased and cannot be used under another organization.

#### Do I need my own OpenAI key with CodeRabbit Pro?

OpenAI cost is included as part of the subscription. You don't need to have your
own OpenAI key.

#### What Large Language Models does CodeRabbit use?
#### How can I add or remove users for my subscription?

CodeRabbit currently utilizes OpenAI's `gpt-4-turbo` and `gpt-3.5-turbo`. We're
researching and testing upcoming LLMs to ensure we're offering the most precise
reviews possible.
To manage users, log in to CodeRabbit and navigate to subscriptions. You can add
or remove users as needed.

### Usage and Configuration

#### Can CodeRabbit review my existing PRs after integrating it?

CodeRabbit will by default only review new PRs or existing PRs which have a new
commit after the app is installed. You can, however, use the
`@coderabbitai review` command on the PR to trigger a review for existing PRs.

#### Can I customize CodeRabbit?

Expand All @@ -82,11 +89,6 @@ discussions, and issues, as well as read/write access to pull requests. On
GitLab, it requires read access to the repository, and the CodeRabbit Bot user
requires a developer role.

#### How can I add or remove users for my subscription?

To manage users, log in to CodeRabbit and navigate to subscriptions. You can add
or remove users as needed.

#### How can I interact with the CodeRabbit bot?

To interact with CodeRabbit's bot, reply to the CodeRabbit Comment. If there are
Expand Down Expand Up @@ -117,6 +119,12 @@ There are hourly rate limits for each developer per repository:
In-trial and open-source plans have lower rate limits than the paid plan. In all
cases, we re-allow further reviews/conversations after a brief timeout.

### Integration

#### Who can install CodeRabbit on the repositories?

You need to be an admin of the orgnizaation to add the repositories.

#### I can't add CodeRabbit to my GitLab Repositories. What should I do?

If there are any access restrictions by domain, then you will need to add
Expand Down
9 changes: 6 additions & 3 deletions docs/integrations/saas-gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ sidebar_label: SaaS GitLab
This guide will assist you in effectively integrating CodeRabbit with SaaS GitLab.

## How it works

For the CodeRabbit app to post reviews on merge requests, it needs to interact with the GitLab API, which requires a Personal Access Token. This token can be generated either by using our default CodeRabbit user or by creating a Personal Access Token from one of your existing users.

The CodeRabbit default user is already set up in GitLab SaaS and will be added to your project when you install the CodeRabbit app. During installation, the necessary webhook for the project will also be created.
Expand All @@ -15,12 +16,12 @@ If your organization prefers to use an organization user, you can create a new u

:::note

Keep in mind that if you want to change the review user, you can either disable the organization user or add a new user via the CodeRabbit UI. However, this will require manually removing the previous user from the projects and associated webhooks.
Afterward, you will need to reinstall the CodeRabbit app for each project.
Keep in mind that if you want to change the review user, you can either disable the organization user or add a new user via the CodeRabbit UI. However, this will require manually removing the previous user from the projects and associated webhooks. Afterward, you will need to reinstall the CodeRabbit app for each project.

:::

## GitLab Access Tokens

To interact with the GitLab API, a **Personal Access Token** is required. This token can either be generated by using our default CodeRabbit user or by creating a **Personal Access Token** from one of your existing users.

Upon first login to the application (immediately after the onboarding screen), you will need to choose based on your organization's requirements.
Expand All @@ -30,11 +31,13 @@ Upon first login to the application (immediately after the onboarding screen), y
**We recommend using the default CodeRabbit user** for most organizations as it is pre-configured. However, we understand that some organizations may prefer more control over the user or have restrictions regarding user inclusion within their organization.

### Personal Access Tokens

If your organization opts to use another user within the organization, you can do so by [generating a personal access token](#generating-a-personal-access-token).

![gitlab organization user modal choice](./images/gitlab_organization_user.png)

#### Recommendations

* **Create a dedicated user for CodeRabbit** - This ensures the user is exclusively for CodeRabbit, allowing better access control.
* **Use "CodeRabbit" as the username** - This makes the user easily recognizable for future reference.
* **Use a dedicated email address** - This helps in easy identification and management.
Expand All @@ -45,7 +48,7 @@ If your organization opts to use another user within the organization, you can d
* Personal access tokens have expiration dates. Ensure the expiration date covers the duration of your intended use of the CodeRabbit app.
* Code reviews will be attributed to the owner of the personal access token.
* If the personal access token expires, you can add a new one via the CodeRabbit UI:
* Navigate to the "GitLab User" page in the sidebar.
* Navigate to the "GitLab User" page in the sidebar.
* Click the "Update" button on the displayed card to see the same modal as the initial login.

### Generating a Personal Access Token
Expand Down
6 changes: 5 additions & 1 deletion docs/integrations/self-hosted-gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ If the self-managed GitLab instance is not found, we initiate the onboarding pro
### **Step 3: Onboarding Manual or Automated**

#### 1. Automated onboarding

![Untitled](./images/automated-onboarding.png)

#### **Why do we need the Admin Access Token?**

Admin access token is required to set up a new CodeRabbit bot user within your
self-managed instance. The token is needed only once during the initial setup
process. Once the token is generated, you can set its minimum expiration period.
This is the standard approach used by other products in this category.
This is the standard approach used by other products in this category.
This is not automatically installing the CodeRabbit
app across all projects. You will add CodeRabbit manually on the projects you
wish, as the next step.
Expand All @@ -49,6 +50,7 @@ For the manual onboarding process we need to create the [CodeRabbit user](#creat
![Untitled](./images/manual-onboarding.png)

#### **Creating CodeRabbit user**

This feature will work with any user from your organization, but we strongly suggest creating a
dedicated user called **CodeRabbitAI**. This ensures clarify about which user is used for our
application and allows for better fine-grained access control.
Expand All @@ -58,11 +60,13 @@ After the user is created, you can retrieve the **User ID** from that user's pro
The access token is used to post reviews on merge requests.

#### **Creating OAuth2 application**

For self-managed GitLab, we recommend creating an instance-wide application unless you want the reviews to be limited to a single group or user.

Please follow the steps outlined in the [GitLab documentation](https://docs.gitlab.com/ee/integration/oauth_provider.html#create-an-instance-wide-application) for creating the application.

Requirements:

1. Scopes: `api read_user email`
2. Callback URL: `https://app.coderabbit.ai/login`

Expand Down
10 changes: 4 additions & 6 deletions docs/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ committed.

<iframe width="560" height="315" 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>

### How does CodeRabbit work?

**CodeRabbit** integrates into code repositories using GitHub or GitLab webhooks
and monitors events related to Pull Request (PR) and Merge Request (MR) changes.
A comprehensive review is performed when a PR or MR is created, and for
Expand All @@ -35,7 +33,7 @@ directly back to the PR or MR.

![CodeRabbit Flow](about/images/CodeRabbitFlow.png)

### Data, Privacy, and Security
## Data, Privacy, and Security

**CodeRabbit** does not use data collected during code reviews to train or
influence the models. Queries to the Large Language Models (LLMs) are ephemeral
Expand All @@ -56,17 +54,17 @@ complies with SOC2 Type II and GDPR standards.
Opting Out: You can choose to opt out of data storage at any time. Opting out
won't affect your access but will limit the personalization of the reviews.

### Do you need CodeRabbit with the AI code generators like GitHub Copilot?
## CodeRabbit with other AI code generators

Code reviews remain essential, whether the code is written by a human or a bot.
This is mainly because the perspective of the reviewer differs from that of the
code generator, whether human or machine. This distinction is precisely why
human peer reviews have been effective for so long. While AI-powered
code-generation tools hold immense potential, it's important to recognize that
code-generation tools like GitHub Copilot hold immense potential, it's important to recognize that
these generators are still in their early stages and may not be equipped to
auto-generate meaningful code for moderately complex applications.

### How is CodeRabbit different from existing code review tools?
## CodeRabbit is different

Traditional code review tools excel in linting and static analysis, but they
fall short in providing context-aware, conversational feedback with actionable
Expand Down

0 comments on commit 3527575

Please sign in to comment.