diff --git a/docs/about/features.md b/docs/about/features.md index 9959e553..75aa77f0 100644 --- a/docs/about/features.md +++ b/docs/about/features.md @@ -13,13 +13,13 @@ High-Level Summary: This offers a concise overview of the changes in the pull request. It helps the team, including those without technical expertise, to quickly understand the changes and the impact on the product. -![Summary Overview](./images/Summary-Overview.png) +![Summary Overview](/img/about/Summary-Overview.png) Walkthrough: A detailed code walkthrough to understand the changes in each file that is part of the pull request, followed by a celebratory poem about the changes. -![Summary Walkthrough](./images/Summary-Walkthrough.png) +![Summary Walkthrough](/img/about/Summary-Walkthrough.png) ### 2. Code Review feedback {#code-review-feedback} @@ -27,14 +27,14 @@ Review feedback is posted as review comments on the lines of the code that 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. -![Review Feedback](./images/ReviewFeedback.png) +![Review Feedback](/img/about/ReviewFeedback.png) A review status is generated for each commit that is reviewed. It displays the commit IDs that were reviewed, the files examined and ignored, as well as the additional comments generated for each review, and so on. Review status is useful for understanding the auxiliary context of the review. -![Review Status](./images/ReviewStatus.png) +![Review Status](/img/about/ReviewStatus.png) ### 3. Chat with CodeRabbit {#chat-with-coderabbit} @@ -44,11 +44,11 @@ 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. -![Chat](./images/chat.png) +![Chat](/img/about/chat.png) ### 4. Issue Validation {#issue-validation} Pull request changes are validated against the linked GitHub or GitLab issue and identifies all other issues which might be affected by this change. -![Issue Validation](./images/issue-validation.png) +![Issue Validation](/img/about/issue-validation.png) diff --git a/docs/about/images/CodeRabbitFlow.png b/docs/about/images/CodeRabbitFlow.png deleted file mode 100644 index 81cce737..00000000 Binary files a/docs/about/images/CodeRabbitFlow.png and /dev/null differ diff --git a/docs/about/pricing.md b/docs/about/pricing.md index 470c8fe2..4d71de6f 100644 --- a/docs/about/pricing.md +++ b/docs/about/pricing.md @@ -74,15 +74,15 @@ These are the hourly usage limits for each developer per repository: - During the trial period, seat assignment is automatic, but the number of seats can be adjusted when purchasing the subscription. -![Seat Management](./images/cr_seat_manage_dark.png#gh-dark-mode-only) -![Seat Management](./images/cr_seat_manage_light.png#gh-light-mode-only) +![Seat Management](/img/about/cr_seat_manage_dark.png#gh-dark-mode-only) +![Seat Management](/img/about/cr_seat_manage_light.png#gh-light-mode-only) ### Free Plan - Seats are assigned to new developers immediately -![Free Seat Assignment](./images/cr_seat_free_dark.png#gh-dark-mode-only) -![Free Seat Assignment](./images/cr_seat_free_light.png#gh-light-mode-only) +![Free Seat Assignment](/img/about/cr_seat_free_dark.png#gh-dark-mode-only) +![Free Seat Assignment](/img/about/cr_seat_free_light.png#gh-light-mode-only) **Note:** The subscription is limited to human users; bot users are not supported. Thus, pull requests or merge requests created by bots will not be diff --git a/docs/about/support.md b/docs/about/support.md index 5a4bad40..c3d8b19f 100644 --- a/docs/about/support.md +++ b/docs/about/support.md @@ -22,8 +22,8 @@ Complete the support ticket by providing your name, email, a description of your issue, and attaching any necessary files. If you are reporting a bug, please provide the GitHub or GitLab organization name. -![Open a Ticket](./images/cr_support_help_light.png#gh-light-mode-only) -![Open a Ticket](./images/cr_support_help_dark.png#gh-dark-mode-only) +![Open a Ticket](/img/about/cr_support_help_light.png#gh-light-mode-only) +![Open a Ticket](/img/about/cr_support_help_dark.png#gh-dark-mode-only) ## Email Support @@ -33,7 +33,7 @@ You can also reach out to us at :::tip To see more common issues faced by CodeRabbit users, visit our -[FAQ section](../faq/faq.md) for detailed answers and solutions to frequently +[FAQ section](../faq.md) for detailed answers and solutions to frequently encountered problems. ::: diff --git a/docs/guides/configure-coderabbit.md b/docs/configure-coderabbit.md similarity index 99% rename from docs/guides/configure-coderabbit.md rename to docs/configure-coderabbit.md index 0d43af59..a2b35f10 100644 --- a/docs/guides/configure-coderabbit.md +++ b/docs/configure-coderabbit.md @@ -5,7 +5,7 @@ description: CodeRabbit offers various configuration options to tailor the reviews to your specific requirements. Configuration can be made using one of the below options. -sidebar_position: 1 +sidebar_position: 3 --- ```mdx-code-block diff --git a/docs/faq/faq.md b/docs/faq.md similarity index 74% rename from docs/faq/faq.md rename to docs/faq.md index 53096396..c77ab4ec 100644 --- a/docs/faq/faq.md +++ b/docs/faq.md @@ -2,8 +2,11 @@ title: FAQs sidebar_label: FAQs description: Frequently asked questions about CodeRabbit. +sidebar_position: 7 --- +### General + #### How accurate is CodeRabbit's review? Early adoption results for CodeRabbit have been highly promising, demonstrating @@ -14,13 +17,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. @@ -35,39 +38,62 @@ uses proprietary code from private repositories for training purposes. Yes, you can switch between different organizations on CodeRabbit. To do so, 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) +![Switch Organizations](/img/faq/cr_support_orgs_light.png#gh-light-mode-only) +![Switch Organizations](/img/faq/cr_support_orgs_dark.png#gh-dark-mode-only) -#### Can a CodeRabbit subscription be used across multiple organizations? +#### What Large Language Models does CodeRabbit use? -Subscription seats are tied to the specific GitHub/GitLab organization under -which they are purchased and cannot be used under another organization. +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. -#### Can CodeRabbit review my existing PRs after integrating it? +#### How does CodeRabbit compare to other AI code generators? -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. +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 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. -#### Who can install CodeRabbit on the repositories? +#### How is CodeRabbit different from other code review tools? + +Traditional code review tools excel in linting and static analysis, but they +fall short in providing context-aware, conversational feedback with actionable +suggestions for changes that can be directly committed. On the other hand, +**CodeRabbit** leverages AI to understand the intent behind the code changes and +provide human-like feedback for applying the best practices. + +### Subscription + +#### 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? Reviews are customizable. For information, check out our -[Customization](../guides/review-instructions.md) guide. +[Customization](./guides/review-instructions.md) guide. #### Can I choose a language other than English for the reviews? @@ -82,11 +108,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 @@ -117,6 +138,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 organization 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 @@ -125,6 +152,6 @@ If there are any access restrictions by domain, then you will need to add :::tip If you have further questions or need additional information, please check out -our [Support](../about/support.md) page for more details. +our [Support](./about/support.md) page for more details. ::: diff --git a/docs/guides/_category_.yml b/docs/guides/_category_.yml index 5db22a7a..05797a2e 100644 --- a/docs/guides/_category_.yml +++ b/docs/guides/_category_.yml @@ -1,4 +1,4 @@ label: Guides -position: 3 +position: 5 collapsible: true collapsed: true diff --git a/docs/guides/commands.md b/docs/guides/commands.md index f5894524..e73ab263 100644 --- a/docs/guides/commands.md +++ b/docs/guides/commands.md @@ -4,7 +4,7 @@ sidebar_label: CodeRabbit Commands description: CodeRabbit offers various commands that can be invoked as PR comments to control the review process. -sidebar_position: 3 +sidebar_position: 4 --- The following commands are available (invoked as PR comments): diff --git a/docs/guides/delete-account.md b/docs/guides/delete-account.md index 425a2b01..a50bf343 100644 --- a/docs/guides/delete-account.md +++ b/docs/guides/delete-account.md @@ -2,7 +2,7 @@ title: Delete CodeRabbit Account sidebar_label: Delete CodeRabbit Account # description: -sidebar_position: 3 +sidebar_position: 5 --- The guide explains how to delete your CodeRabbit account and all the data @@ -43,8 +43,8 @@ upon selecting **Delete Account**. You can open the dropdowns for more information.
-![Delete Account](./images/delete_account_light.png#gh-light-mode-only) -![Delete Account](./images/delete_account_dark.png#gh-dark-mode-only) +![Delete Account](/img/guides/delete_account_light.png#gh-light-mode-only) +![Delete Account](/img/guides/delete_account_dark.png#gh-dark-mode-only)
Deletion will only occur once the admin specifically types in "delete" in the diff --git a/docs/guides/ondemand-reports.md b/docs/guides/ondemand-reports.md index 3d4f9bd1..cdd7a9b8 100644 --- a/docs/guides/ondemand-reports.md +++ b/docs/guides/ondemand-reports.md @@ -3,7 +3,7 @@ title: On-demand Reports sidebar_label: On-demand Reports (Beta) description: CodeRabbit offers a way to generate on-demand reports using a simple API request -sidebar_position: 5 +sidebar_position: 6 --- ```mdx-code-block @@ -25,7 +25,7 @@ Sign in to your CodeRabbit account and navigate to the [**API Keys**](https://ap Click on the **Create API Key** button and enter a name for the API Key. Copy the API key, and keep it safe as it won't be visible again. -![API Keys](./images/api_keys.png) +![API Keys](/img/guides/api_keys.png) ## Generate an On-demand report @@ -54,7 +54,6 @@ Sample output: ] ``` - :::info If you get a 401 UNAUTHORIZED error, check if you're passing the right API key in the `x-coderabbitai-api-key` header diff --git a/docs/guides/review-instructions.md b/docs/guides/review-instructions.md index 180bc035..6098fd6d 100644 --- a/docs/guides/review-instructions.md +++ b/docs/guides/review-instructions.md @@ -5,11 +5,11 @@ description: CodeRabbit offers various customization options to tailor the reviews to your specific requirements. Customizations can be made using one of the below options. -sidebar_position: 2 +sidebar_position: 3 --- The guide explains how to add custom review instructions for the entire project. -Also, see the guide on how to [configure CodeRabbit](./configure-coderabbit.md). +Also, see the guide on how to [configure CodeRabbit](../configure-coderabbit.md). ### Path-based instructions {#path-based} diff --git a/docs/integrations/_category_.yml b/docs/integrations/_category_.yml index 17af8110..af2fcbe0 100644 --- a/docs/integrations/_category_.yml +++ b/docs/integrations/_category_.yml @@ -1,4 +1,4 @@ label: Integrations -position: 4 +position: 6 collapsible: true collapsed: true diff --git a/docs/integrations/images/login-page.png b/docs/integrations/images/login-page.png deleted file mode 100644 index c75d686c..00000000 Binary files a/docs/integrations/images/login-page.png and /dev/null differ diff --git a/docs/integrations/knowledge-base.md b/docs/integrations/knowledge-base.md new file mode 100644 index 00000000..20014f32 --- /dev/null +++ b/docs/integrations/knowledge-base.md @@ -0,0 +1,36 @@ +--- +title: External Knowledge Base +description: Integrate CodeRabbit with an external knowledge base for issue tracking. +sidebar_label: Knowledge Base +sidebar_position: 3 +--- + +CodeRabbit integrates with external knowledge bases to provide a seamless experience for issue tracking. This will allow CodeRabbit to use the context from the linked issues while reviewing the code. + +## Jira {#jira} + +### CodeRabbit App + +1. Navigate to [integrations][integrations] in the CodeRabbit app. +2. Toggle the Jira switch to enable the integration. + +Upon enabling the Jira integration, CodeRabbit will redirect you to the Jira login page. Enter your Jira credentials to authenticate the integration. + +### CodeRabbit Configuration + +1. Add Jira's Project Keys to the `knowledge_base.jira.project_keys` field in your project's CodeRabbit configuration file at `.coderabbit.yaml`. + +## Linear {#Linear} + +### CodeRabbit App + +1. Navigate to [integrations][integrations] in the CodeRabbit app. +2. Toggle the Linear switch to enable the integration. + +Upon enabling the Linear integration, CodeRabbit will redirect you to the Linear login page. Enter your Linear credentials to authenticate the integration. + +### CodeRabbit Configuration + +1. Add Linear's Team Keys to the `knowledge_base.linear.team_keys` field in your project's CodeRabbit configuration file at `.coderabbit.yaml`. + +[integrations]: https://app.coderabbit.ai/integrations diff --git a/docs/integrations/saas-gitlab.md b/docs/integrations/saas-gitlab.md index 06a87df5..aeb6dd4e 100644 --- a/docs/integrations/saas-gitlab.md +++ b/docs/integrations/saas-gitlab.md @@ -2,11 +2,13 @@ title: Integrating CodeRabbit with SaaS GitLab description: Integrate CodeRabbit with SaaS GitLab. sidebar_label: SaaS GitLab +sidebar_position: 1 --- 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. @@ -15,37 +17,39 @@ 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. -![gitlab user modal choice](./images/gitlab_user_choice.png) +![gitlab user modal choice](/img/integrations/gitlab_user_choice.png) -**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. +**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) +![gitlab organization user modal choice](/img/integrations/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. -* **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo from [here](./images/logo.svg "download"). +* **Use the CodeRabbit logo as the profile picture** - This further ensures easy recognition. You can download our logo from [here](/img/integrations/logo.svg "download"). #### Key Points to Remember * 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 @@ -63,4 +67,4 @@ GitLab provides an option to generate a personal access token for a new user. Fo 9. Click "Create Personal Access Token." 10. Note down the token as it will only be displayed once. -![Untitled](./images/admin-access-token.png) +![Untitled](/img/integrations/admin-access-token.png) diff --git a/docs/integrations/self-hosted-github.md b/docs/integrations/self-hosted-github.md new file mode 100644 index 00000000..8e646738 --- /dev/null +++ b/docs/integrations/self-hosted-github.md @@ -0,0 +1,133 @@ +--- +title: CodeRabbit for Self-Managed GitHub +description: Integrate CodeRabbit with your Self-Managed GitHub instance. +sidebar_label: Self-Managed GitHub +--- + +This page guides you through the process of integrating your Self-Managed GitHub with CodeRabbit. + +To initiate the integration, we require specific information. This is essential +for the initial setup of CodeRabbit within your domain. Once this setup is +complete, you can log in directly. + +### **Step 1: Getting Started** + +**Visit CodeRabbit:** Visit our [Login](https://coderabbit.ai/login) page and +select Self-Hosted GitHub + +![login-page](/img/integrations/login-self-hosted-github.png) + +On this page, enter the URL of your self-managed GitHub instance and click +submit. Once, you submit, we check our database for a record of your +organization and if we find an existing one, we will start the login process. + +![Untitled](/img/integrations/self-hosted-github-host-url.png) + +If the self-managed GitHub instance is not found, you will be required to enter more details for the onboarding. + +### **Step 2: GitHub OAuth App** + +Navigate to your GitHub Self-Hosted Instance and follow the steps below to [create an OAuth App](https://docs.github.com/en/enterprise-server@latest/apps/oauth-apps/building-oauth-apps/creating-an-oauth-app): + +1. Sign in to your GitHub Enterprise account. +2. In the upper-right corner of any page, click your profile photo, then click **Settings**. +3. In the left sidebar, click **Developer settings** > **OAuth Apps**. +4. Click **New OAuth App**. +5. Set the following fields: + - **Application name**: `CodeRabbit OAuth` + - **Homepage URL**: `https://coderabbit.ai` + - **Application description**: `OAuth application for signing into CodeRabbit` + - **Authorization callback URL**: `https://app.coderabbit.ai/login` +6. Click **Register application**. + +![GitHub Create OAuth App](/img/integrations/github-create-oauth-app.png) + +Once the OAuth App has been created, click on **Generate a new client secret** under the 'Client secrets' section and copy the secret as it will be visible once only + +Keep the following details handy: + +- Client ID +- Client secret + +![GitHub OAuth Client ID & Secret](/img/integrations/github-oauth-client-id-secret.png) + +### **Step 3: GitHub App** + +Navigate to your GitHub Self-Hosted Instance and follow the steps below to [create a GitHub App](https://docs.github.com/en/enterprise-server@latest/apps/creating-github-apps/registering-a-github-app/registering-a-github-app): + +1. Sign in to your GitHub Enterprise account. +2. In the upper-right corner of any page, click your profile photo, then click **Settings**. +3. In the left sidebar, click **Developer settings** > **GitHub Apps** +4. Click **New GitHub App**. +5. Set the following fields: + - **GitHub App name**: `CodeRabbit GitHub App` + - **Description**: `GitHub App for CodeRabbit` + - **Homepage URL**: `https://coderabbit.ai` + - **Callback URL**: `https://app.coderabbit.ai/login` + - **Request user authorization (OAuth) during installation**: `true` + - **Webhook Active**: `true` + - **Webhook URL**: `https://app.coderabbit.ai/githubHandler` + - **Webhook secret**: Use a secure string and keep it handy. + - **Permissions**: + - **Repository permissions**: + - **Checks**: Read-only + - **Contents**: Read and write + - **Discussions**: Read-only + - **Issues**: Read and write + - **Metadata**: Read-only + - **Pull requests**: Read and write + - **Organization permissions**: + - **Members**: Read-only + - **Events**: + - Meta + - Issue comment + - Issues + - Label + - Public + - Pull request + - Pull request review + - Pull request review comment + - Pull request review thread + - Push + - Release +6. Click **Create GitHub App**. + +Once the GitHub App has been created, click on **Generate a new client secret** under the 'Client secrets' section and copy the secret as it will be visible once only. + +Scroll down and click on **Generate a private key** under the 'Private keys' section and download the PEM file. + +Also, from the **Install App** tab, install the GitHub App to your organizations. + +Keep the following details handy: + +- App ID +- Client ID +- Client secret +- Webhook secret +- Private key + +![GitHub App Client ID & Secret](/img/integrations/github-app-client-id-secret.png) + +### **Step 4: CodeRabbit UI Onboarding** + +Submit the details that were accumulated in previous steps: + +- Host URL of your GitHub instance +- OAuth Client ID +- OAuth Client Secret +- GitHub App ID +- GitHub App Client ID +- GitHub App Client Secret +- GitHub App Webhook Secret +- GitHub App Private Key + +Click on Submit and the login process will be initiated. +On subsequent visits, your setup will be automatically detected, allowing for direct login. + +### **Step 5: Whitelist CodeRabbit IP address** + +Use this CodeRabbit IP if your instance requires IP whitelisting +`35.222.179.152/32` + +VPN tunneling is available as an add-on package. Please reach out to us at +[contact@coderabbit.ai](mailto:contact@coderabbit.ai) if you are interested. diff --git a/docs/integrations/self-hosted-gitlab.md b/docs/integrations/self-hosted-gitlab.md index a6a5f552..62374790 100644 --- a/docs/integrations/self-hosted-gitlab.md +++ b/docs/integrations/self-hosted-gitlab.md @@ -2,6 +2,7 @@ title: CodeRabbit for Self-Managed GitLab description: Integrate CodeRabbit with your Self-Managed GitLab instance. sidebar_label: Self-Managed GitLab +sidebar_position: 2 --- This page guides you through the process of integrating your Self-Managed GitLab @@ -16,7 +17,7 @@ complete, you can log in directly using the OAuth2 flow. **Visit CodeRabbit:** Visit our [Login](https://coderabbit.ai/login) page and select Self-Hosted GitLab -![login-page](./images/login-page.png) +![login-page](/img/integrations/login-self-hosted-gitlab.png) ### Step 2: Enter your Self-Managed GitLab URL @@ -24,21 +25,22 @@ On this page, enter the URL of your self-managed GitLab instance and click submit. Once, you submit, we check our database for a record of your organization and if we find an existing one, we are starting the login process. -![Untitled](./images/self-hosted-gitlab-host-url.png) +![Untitled](/img/integrations/self-hosted-gitlab-host-url.png) If the self-managed GitLab instance is not found, we initiate the onboarding process, which can be either manual or automated. ### **Step 3: Onboarding Manual or Automated** #### 1. Automated onboarding -![Untitled](./images/automated-onboarding.png) + +![Untitled](/img/integrations/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. @@ -46,9 +48,10 @@ wish, as the next step. #### 2. Manual onboarding For the manual onboarding process we need to create the [CodeRabbit user](#creating-coderabbit-user) and the [OAuth2 GitLab application](#creating-oauth2-application). -![Untitled](./images/manual-onboarding.png) +![Untitled](/img/integrations/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. @@ -58,11 +61,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` @@ -85,14 +90,14 @@ the token, please follow the process outlined below: 9. Select Create personal access token. 10. Please note down this token as this will be visible one time only -![Untitled](./images/admin-access-token.png) +![Untitled](/img/integrations/admin-access-token.png) ### **Step 4: Paste the details and click submit** - Submit the form. - We will handle the setup process for you. - On subsequent visits, your setup will be automatically detected, allowing for - direct login. ![Untitled](./images/self-hosted-page.png) + direct login. ![Untitled](/img/integrations/self-hosted-page.png) ### **Step 5: Whitelist CodeRabbit IP address** diff --git a/docs/introduction/introduction.md b/docs/introduction.md similarity index 65% rename from docs/introduction/introduction.md rename to docs/introduction.md index 8d3c2b57..43e5a0d1 100644 --- a/docs/introduction/introduction.md +++ b/docs/introduction.md @@ -1,6 +1,6 @@ --- id: introduction -title: What is CodeRabbit? +title: Introduction sidebar_label: Introduction sidebar_position: 1 description: @@ -10,6 +10,8 @@ description: slug: "/" --- + + **CodeRabbit** is an innovative, AI-first code reviewer. It provides context-aware review feedback on a pull request within minutes, thereby significantly reducing the time and effort associated with manual code reviews. @@ -23,28 +25,26 @@ performing continuous, incremental reviews for each commit within a pull request. Review feedback is sent back to the pull requests and can be directly committed. -### 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 incremental commits and comments addressed to the bot. The feedback is then sent directly back to the PR or MR. -![CodeRabbit Flow](../about/images/CodeRabbitFlow.png) +![CodeRabbit Flow](/img/about/coderabbit-flow.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 and there is zero retention on LLMs. Neither we nor the LLMs provider(s) share any data collected during the code review process with third parties. -Data storage: Code downloaded during the review process is temporarily stored in -memory and deleted once the review is completed. The code is not stored or used for -any other purpose. However, CodeRabbit enhances future reviews for your organization by -storing the embeddings of the learnings generated from chat conversations. Additionally, -it integrates embeddings from issues in workflow systems (Liner, Jira, GitHub/GitLab issues) +Data storage: Code downloaded during the review process is temporarily stored in +memory and deleted once the review is completed. The code is not stored or used for +any other purpose. However, CodeRabbit enhances future reviews for your organization by +storing the embeddings of the learnings generated from chat conversations. Additionally, +it integrates embeddings from issues in workflow systems (Liner, Jira, GitHub/GitLab issues) to assess the impact of code changes on existing issues. Compliance and Data Privacy: Your data is kept confidential, isolated by the @@ -53,21 +53,3 @@ 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? - -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 -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? - -Traditional code review tools excel in linting and static analysis, but they -fall short in providing context-aware, conversational feedback with actionable -suggestions for changes that can be directly committed. On the other hand, -**CodeRabbit** leverages AI to understand the intent behind the code changes and -provide human-like feedback for applying the best practices. diff --git a/docs/tools/_category_.yml b/docs/tools/_category_.yml new file mode 100644 index 00000000..0ea58591 --- /dev/null +++ b/docs/tools/_category_.yml @@ -0,0 +1,4 @@ +label: Supported Tools +position: 4 +collapsible: true +collapsed: true diff --git a/docs/tools/biome.md b/docs/tools/biome.md new file mode 100644 index 00000000..953debee --- /dev/null +++ b/docs/tools/biome.md @@ -0,0 +1,36 @@ +--- +title: Biome +sidebar_label: Biome +description: CodeRabbit's guide to Biome. +--- + +[Biome](https://biomejs.dev/) is a linter for JavaScript, TypeScript, JSX, TSX, JSON, JSONC, CSS. + +## Files + +Biome will run on files with the following extensions: + +- `.js` +- `.ts` +- `.cjs` +- `.mjs` +- `.d.cts` +- `.d.mts` +- `.jsx` +- `.tsx` +- `.json` +- `.jsonc` +- `.css` + +## Configuration + +Biome supports the following config files: + +- `biome.jsonc` +- `biome.json` + +CodeRabbit will use the default settings based on the profile selected if no config file is found. + +## Links + +- [Biome Configuration](https://biomejs.dev/reference/configuration/) diff --git a/docs/tools/checkov.md b/docs/tools/checkov.md new file mode 100644 index 00000000..93a7e3d1 --- /dev/null +++ b/docs/tools/checkov.md @@ -0,0 +1,62 @@ +--- +title: Checkov +sidebar_label: Checkov +description: CodeRabbit's guide to Checkov. +--- + +[Checkov](https://www.checkov.io/) is a static code analysis tool for scanning Infrastructure as Code (IaC) files for misconfigurations. + +## Files + +Checkov will run on files with the following files and extensions: + +- `.tf` +- `.yml` +- `.yaml` +- `.json` +- `.template` +- `.bicep` +- `.hcl` +- `bower.json` +- `build.gradle` +- `build.gradle.kts` +- `go.sum` +- `gradle.properties` +- `METADATA` +- `npm-shrinkwrap.json` +- `package.json` +- `package-lock.json` +- `pom.xml` +- `requirements.txt` +- `Dockerfile` +- `.dockerfile` +- `Dockerfile.*` +- `.csproj` +- `yarn.lock` +- `Gemfile` +- `Gemfile.lock` +- `go.mod` +- `paket.dependencies` +- `paket.lock` +- `packages.config` +- `composer.json` +- `composer.lock` + +## Configuration + +CodeRabbit will include on the following severity levels based on the profile selected: + +### Chill + +- `HIGH` +- `CRITICAL` + +### Assertive + +- `MEDIUM` +- `HIGH` +- `CRITICAL` + +## Links + +- [Checkov All Resource Scans](https://www.checkov.io/5.Policy%20Index/all.html) diff --git a/docs/tools/detekt.md b/docs/tools/detekt.md new file mode 100644 index 00000000..b3877a98 --- /dev/null +++ b/docs/tools/detekt.md @@ -0,0 +1,26 @@ +--- +title: Detekt +sidebar_label: Detekt +description: CodeRabbit's guide to Detekt. +--- + +[Detekt](https://detekt.dev/) is a static code analysis tool specifically designed for Kotlin projects + +## Files + +Detekt will run on files with the following extensions: + +- `.kt` +- `.kts` + +## Configuration + +Detekt uses a YAML style configuration file. + +Detekt supports the following config files: + +- User-defined config file set at `reviews.tools.detekt.config_file` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → Detekt → Config File" field in CodeRabbit's settings page. + +## Links + +- [Detekt Configuration](https://detekt.dev/docs/introduction/configurations/) diff --git a/docs/tools/eslint.md b/docs/tools/eslint.md new file mode 100644 index 00000000..121e2c60 --- /dev/null +++ b/docs/tools/eslint.md @@ -0,0 +1,29 @@ +--- +title: ESLint +sidebar_label: ESLint +description: CodeRabbit's guide to ESLint. +--- + +[ESLint](https://eslint.org/) is a static code analysis tool for identifying problematic patterns found in JavaScript code. + +## Files + +ESLint will run on files with the following extensions: + +- `.js` +- `.jsx` +- `.ts` +- `.tsx` + +## Configuration + +ESLint supports the following config files: + +- `eslint.config.js` +- `eslint.config.mjs` +- `eslint.config.cjs` +- `.eslintrc` + +## Links + +- [ESLint Configuration](https://eslint.org/docs/latest/use/configure/configuration-files) diff --git a/docs/tools/gitleaks.md b/docs/tools/gitleaks.md new file mode 100644 index 00000000..1e725b06 --- /dev/null +++ b/docs/tools/gitleaks.md @@ -0,0 +1,21 @@ +--- +title: Gitleaks +sidebar_label: Gitleaks +description: CodeRabbit's guide to Gitleaks. +--- + +[Gitleaks](https://gitleaks.io/) is a secret-scanner. + +## Files + +Gitleaks will run on all files. + +## Configuration + +Gitleaks supports the following config files: + +- `gitleaks.toml` + +## Links + +- [Gitleaks Configuration](https://github.com/gitleaks/gitleaks#configuration) diff --git a/docs/tools/golangci-lint.md b/docs/tools/golangci-lint.md new file mode 100644 index 00000000..541db7b9 --- /dev/null +++ b/docs/tools/golangci-lint.md @@ -0,0 +1,28 @@ +--- +title: golangci-lint +sidebar_label: golangci-lint +description: CodeRabbit's guide to golangci-lint. +--- + +[golangci-lint](https://golangci-lint.run/) is a fast Go linters runner. + +## Files + +golangci-lint will run on files with the following extensions: + +- `.go` +- `go.mod` + +## Configuration + +golangci-lint supports the following config files: + +- User-defined config file set at `reviews.tools.golangci-lint.config_file` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → golangci-lint → Config File" field in CodeRabbit's settings page. +- `.golangci.yml` +- `.golangci.yaml` +- `.golangci.toml` +- `.golangci.json` + +## Links + +- [golangci-lint Configuration](https://golangci-lint.run/usage/configuration/) diff --git a/docs/tools/hadolint.md b/docs/tools/hadolint.md new file mode 100644 index 00000000..044a561d --- /dev/null +++ b/docs/tools/hadolint.md @@ -0,0 +1,41 @@ +--- +title: Hadolint +sidebar_label: Hadolint +description: CodeRabbit's guide to Hadolint. +--- + +[Hadolint](https://github.com/hadolint/hadolint) is a Dockerfile linter. + +## Files + +Hadolint will run on files with the following file names: + +- `Dockerfile` +- `*.dockerfile` +- `Dockerfile.*` + +## Configuration + +Hadolint supports the following config files: + +- `.hadolint.yaml` + +CodeRabbit will ignore the following severity levels if no config file is found: + +### Chill + +- `none` +- `ignore` +- `style` +- `info` +- `warning` + +### Assertive + +- `none` +- `ignore` +- `style` + +## Links + +- [Hadolint Configuration](https://github.com/hadolint/hadolint?tab=readme-ov-file#configure) diff --git a/docs/tools/languagetool.md b/docs/tools/languagetool.md new file mode 100644 index 00000000..8ef4a59f --- /dev/null +++ b/docs/tools/languagetool.md @@ -0,0 +1,36 @@ +--- +title: LanguageTool +sidebar_label: LanguageTool +description: CodeRabbit's guide to LanguageTool. +--- + +[LanguageTool](https://github.com/languagetool-org/languagetool) is a style and grammar checker. + +## Files + +LanguageTool will run on files with the following extensions: + +- `.md` +- `.mdx` +- `.markdown` +- `.txt` + +## Configuration + +LanguageTool's style and grammar check depends on the language selected in CodeRabbit's configuration. You can set the language by setting the `language` field in your project's `.coderabbit.yaml` file or setting the "Review Language" field in CodeRabbit's settings page. + +CodeRabbit allows further configuring LanguageTool by setting specific rules and categories to be enabled/disabled. This can be done under the `reviews.tools.languagetool` field in your project's `.coderabbit.yaml` file or setting the various options under "Review → Tools → LanguageTool" in CodeRabbit's settings page. The following options are available: + +- `enabled` - Enable or disable LanguageTool. +- `enabled_rules` - Enable specific rules. +- `disabled_rules` - Disable specific rules. +- `enabled_categories` - Enable specific categories. +- `disabled_categories` - Disable specific categories. +- `enabled_only`- Enable only the rules and categories of IDs are specified with 'enabledRules' or 'enabledCategories'. +- `level` - Set the level of feedback to be provided by LanguageTool. The following levels are available: + - `default` - Provides feedback on common issues. + - `picky` - Provides feedback on more issues, rules that you might only find useful when checking formal text. + +## Links + +- [LanguageTool Rules](https://community.languagetool.org/rule/list?lang=en) diff --git a/docs/tools/markdownlint.md b/docs/tools/markdownlint.md new file mode 100644 index 00000000..137eb56b --- /dev/null +++ b/docs/tools/markdownlint.md @@ -0,0 +1,29 @@ +--- +title: Markdownlint +sidebar_label: Markdownlint +description: CodeRabbit's guide to Markdownlint. +--- + +[Markdownlint](https://github.com/DavidAnson/markdownlint) is a linter for Markdown. + +## Files + +Markdownlint will run on files with the following extensions: + +- `.md` +- `.markdown` + +## Configuration + +Markdownlint supports the following config files: + +- `.markdownlint.jsonc` +- `.markdownlint.json` +- `.markdownlint.yaml` +- `.markdownlint.yml` + +CodeRabbit will use the default settings based on the profile selected if no config file is found. + +## Links + +- [Markdownlint Configuration](https://github.com/DavidAnson/markdownlint?tab=readme-ov-file#configuration) diff --git a/docs/tools/phpstan.md b/docs/tools/phpstan.md new file mode 100644 index 00000000..a756f4c4 --- /dev/null +++ b/docs/tools/phpstan.md @@ -0,0 +1,27 @@ +--- +title: PHPStan +sidebar_label: PHPStan +description: CodeRabbit's guide to PHPStan. +--- + +[PHPStan](https://phpstan.org/) is a static analysis tool for PHP. + +## Files + +PHPStan will run on files with the following extensions: + +- `.php` + +## Configuration + +PHPStan supports the following config files: + +- `phpstan.neon` +- `phpstan.neon.dist` +- `phpstan.dist.neon` + +CodeRabbit will not run PHPStan if no config file is found. + +## Links + +- [PHPStan Configuration](https://phpstan.org/config-reference) diff --git a/docs/tools/ruff.md b/docs/tools/ruff.md new file mode 100644 index 00000000..255ce816 --- /dev/null +++ b/docs/tools/ruff.md @@ -0,0 +1,27 @@ +--- +title: Ruff +sidebar_label: Ruff +description: CodeRabbit's guide to Ruff. +--- + +[Ruff](https://docs.astral.sh/ruff/) is a linter for Python. + +## Files + +Ruff will run on files with the following extensions: + +- `.py` + +## Configuration + +Ruff supports the following config files: + +- `pyproject.toml` +- `ruff.toml` +- `.ruff.toml` + +CodeRabbit will use the default settings based on the profile selected if no config file is found. + +## Links + +- [Ruff Configuration](https://docs.astral.sh/ruff/configuration/) diff --git a/docs/tools/shellcheck.md b/docs/tools/shellcheck.md new file mode 100644 index 00000000..752e8675 --- /dev/null +++ b/docs/tools/shellcheck.md @@ -0,0 +1,36 @@ +--- +title: ShellCheck +sidebar_label: ShellCheck +description: CodeRabbit's guide to ShellCheck. +--- + +[ShellCheck](https://www.shellcheck.net/) is a linter for shell scripts. + +## Files + +ShellCheck will run on files with the following extensions: + +- `.sh` +- `.bash` +- `.ksh` +- `.dash` + +## Configuration + +CodeRabbit will use the following settings based on the profile selected: + +### Chill + +```shell +--severity=warning +``` + +### Assertive + +```shell +--severity=style +``` + +## Links + +- [ShellCheck Wiki](https://www.shellcheck.net/wiki/) diff --git a/docs/tools/swiftlint.md b/docs/tools/swiftlint.md new file mode 100644 index 00000000..516d99af --- /dev/null +++ b/docs/tools/swiftlint.md @@ -0,0 +1,27 @@ +--- +title: SwiftLint +sidebar_label: SwiftLint +description: CodeRabbit's guide to SwiftLint. +--- + +[SwiftLint](https://realm.github.io/SwiftLint/) is a linter for Swift. + +## Files + +SwiftLint will run on files with the following extensions: + +- `.swift` + +## Configuration + +Ruff supports the following config files: + +- User-defined config file set at `reviews.tools.swiftlint.config_file` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → SwiftLint → Config File" field in CodeRabbit's settings page. +- `.swiftlint.yaml` +- `.swiftlint.yml` + +CodeRabbit will use the default settings if no config file is found. + +## Links + +- [SwiftLint Configuration](https://github.com/realm/SwiftLint?tab=readme-ov-file#configuration) diff --git a/docs/tools/tools.md b/docs/tools/tools.md new file mode 100644 index 00000000..578e9039 --- /dev/null +++ b/docs/tools/tools.md @@ -0,0 +1,76 @@ +--- +title: Supported Tools +sidebar_label: Supported Tools +description: Overview of CodeRabbit's supported linters and security analysis tools. +sidebar_position: 1 +--- + +CodeRabbit supports various linters and security analysis tools to improve the code review process. The output of these tools is used to enhance the feedback provided by CodeRabbit, making it possible to provide 1-click fixes for common issues. + +## Enabling/Disabling Tools + +You can enable or disable tools by setting `reviews.tools..enabled` in your project's `.coderabbit.yaml` file or setting the "Review → Tools → Tool → Enabled" field in CodeRabbit's settings page. + +## Customizing Tools + +CodeRabbit supports customizing the strictness of tools by setting `reviews.profile` in your project's `.coderabbit.yaml` file or setting the "Review → Profile" field in CodeRabbit's settings page. The following profiles are available: + +- `Chill` - Yields less feedback, that may be considered lenient. +- `Assertive` - Yields more feedback, that may be considered nit-picky. + +Apart from the overall profile, you can also configure each tool by providing a path to a configuration file (specific to the tool) in your project. This would allow you to further customize the tool's behavior, by enabling/disabling specific rules, setting rule severity, etc. + +## Checking Tool Output + +When a tool is enabled, CodeRabbit will run it on your change request and attach the output under "Review details" comment in the change request. The output will be displayed in a structured format, with information on the file, line number, and the issue detected. For example: + +```text +Ruff +fib.py +21-21: f-string without any placeholders + +Remove extraneous f prefix + +(F541) +``` + +## Supported Tools + +| Technology | Tools | +|:----------------------------|:-----------------------------------------------------------| +| All | [Gitleaks][Gitleaks] | +| CloudFormation | [Checkov][Checkov] | +| CSS | [Biome][Biome] | +| Docker | [Hadolint][Hadolint], [Checkov][Checkov] | +| Go | [golangci-lint][golangci-lint] | +| Helm | [Checkov][Checkov] | +| Javascript | [Biome][Biome], [ESLint][ESLint] | +| JSON, JSONC | [Biome][Biome] | +| JSX | [Biome][Biome], [ESLint][ESLint] | +| Kotlin | [Detekt][Detekt] | +| Kubernetes | [Checkov][Checkov] | +| Markdown | [Markdownlint][Markdownlint], [LanguageTool][LanguageTool] | +| PHP | [PHPStan][PHPStan] | +| Plaintext | [LanguageTool][LanguageTool] | +| Python | [Ruff][Ruff] | +| Shell (sh, bash, ksh, dash) | [ShellCheck][ShellCheck] | +| Swift | [SwiftLint][SwiftLint] | +| Terraform | [Checkov][Checkov] | +| TSX | [Biome][Biome], [ESLint][ESLint] | +| Typescript | [Biome][Biome], [ESLint][ESLint] | +| YAML | [YamlLint][YamlLint] | + +[ShellCheck]: ./shellcheck.md +[Ruff]: ./ruff.md +[Markdownlint]: ./markdownlint.md +[LanguageTool]: ./languagetool.md +[Biome]: ./biome.md +[Hadolint]: ./hadolint.md +[SwiftLint]: ./swiftlint.md +[PHPStan]: ./phpstan.md +[golangci-lint]: ./golangci-lint.md +[YamlLint]: ./yamllint.md +[Gitleaks]: ./gitleaks.md +[Checkov]: ./checkov.md +[Detekt]: ./detekt.md +[ESLint]:./eslint.md diff --git a/docs/tools/yamllint.md b/docs/tools/yamllint.md new file mode 100644 index 00000000..962a2a78 --- /dev/null +++ b/docs/tools/yamllint.md @@ -0,0 +1,28 @@ +--- +title: Yamllint +sidebar_label: Yamllint +description: CodeRabbit's guide to Yamllint. +--- + +[Yamllint](https://yamllint.readthedocs.io/en/stable/) is a linter for YAML. + +## Files + +Yamllint will run on files with the following extensions: + +- `.yaml` +- `.yml` + +## Configuration + +Yamllint supports the following config files: + +- `.yamllint` +- `.yamllint.yaml` +- `.yamllint.yml` + +CodeRabbit will use the default settings based on the profile selected if no config file is found. + +## Links + +- [Yamllint Configuration](https://yamllint.readthedocs.io/en/stable/configuration.html) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index a46dfe35..f308639d 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -58,11 +58,11 @@ const config: Config = { redirects: [ { from: "/get-started", - to: "/guides/configure-coderabbit", + to: "/configure-coderabbit", }, { from: "/guides/customize-coderabbit", - to: "/guides/configure-coderabbit", + to: "/configure-coderabbit", }, { from: "/guides/prompt-customization", @@ -117,7 +117,18 @@ const config: Config = { "https://buttons.github.io/buttons.js", "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js", "/docs/js/code-block-buttons.js", - `https://cdnjs.cloudflare.com/ajax/libs/axios/1.2.1/axios.min.js`, + "https://cdnjs.cloudflare.com/ajax/libs/axios/1.2.1/axios.min.js", + { + src: "/js/segment.js", + async: false, + }, + { + src: "https://js.hs-scripts.com/43613284.js", + type: "text/javascript", + id: "hs-script-loader", + async: true, + defer: true, + }, { src: "https://cdnjs.cloudflare.com/ajax/libs/axios/1.2.1/axios.min.js", async: true, diff --git a/docs/about/images/ReviewFeedback.png b/static/img/about/ReviewFeedback.png similarity index 100% rename from docs/about/images/ReviewFeedback.png rename to static/img/about/ReviewFeedback.png diff --git a/docs/about/images/ReviewStatus.png b/static/img/about/ReviewStatus.png similarity index 100% rename from docs/about/images/ReviewStatus.png rename to static/img/about/ReviewStatus.png diff --git a/docs/about/images/Summary-Overview.png b/static/img/about/Summary-Overview.png similarity index 100% rename from docs/about/images/Summary-Overview.png rename to static/img/about/Summary-Overview.png diff --git a/docs/about/images/Summary-Walkthrough.png b/static/img/about/Summary-Walkthrough.png similarity index 100% rename from docs/about/images/Summary-Walkthrough.png rename to static/img/about/Summary-Walkthrough.png diff --git a/docs/about/images/app-logo.svg b/static/img/about/app-logo.svg similarity index 100% rename from docs/about/images/app-logo.svg rename to static/img/about/app-logo.svg diff --git a/docs/about/images/chat.png b/static/img/about/chat.png similarity index 100% rename from docs/about/images/chat.png rename to static/img/about/chat.png diff --git a/static/img/about/coderabbit-flow.png b/static/img/about/coderabbit-flow.png new file mode 100644 index 00000000..47f8fd2d Binary files /dev/null and b/static/img/about/coderabbit-flow.png differ diff --git a/docs/about/images/committable-suggestion.png b/static/img/about/committable-suggestion.png similarity index 100% rename from docs/about/images/committable-suggestion.png rename to static/img/about/committable-suggestion.png diff --git a/docs/about/images/cr_seat_free_dark.png b/static/img/about/cr_seat_free_dark.png similarity index 100% rename from docs/about/images/cr_seat_free_dark.png rename to static/img/about/cr_seat_free_dark.png diff --git a/docs/about/images/cr_seat_free_light.png b/static/img/about/cr_seat_free_light.png similarity index 100% rename from docs/about/images/cr_seat_free_light.png rename to static/img/about/cr_seat_free_light.png diff --git a/docs/about/images/cr_seat_manage_dark.png b/static/img/about/cr_seat_manage_dark.png similarity index 100% rename from docs/about/images/cr_seat_manage_dark.png rename to static/img/about/cr_seat_manage_dark.png diff --git a/docs/about/images/cr_seat_manage_light.png b/static/img/about/cr_seat_manage_light.png similarity index 100% rename from docs/about/images/cr_seat_manage_light.png rename to static/img/about/cr_seat_manage_light.png diff --git a/docs/about/images/cr_support_help_dark.png b/static/img/about/cr_support_help_dark.png similarity index 100% rename from docs/about/images/cr_support_help_dark.png rename to static/img/about/cr_support_help_dark.png diff --git a/docs/about/images/cr_support_help_light.png b/static/img/about/cr_support_help_light.png similarity index 100% rename from docs/about/images/cr_support_help_light.png rename to static/img/about/cr_support_help_light.png diff --git a/docs/about/images/help1.png b/static/img/about/help1.png similarity index 100% rename from docs/about/images/help1.png rename to static/img/about/help1.png diff --git a/docs/about/images/help2.png b/static/img/about/help2.png similarity index 100% rename from docs/about/images/help2.png rename to static/img/about/help2.png diff --git a/docs/about/images/help3.png b/static/img/about/help3.png similarity index 100% rename from docs/about/images/help3.png rename to static/img/about/help3.png diff --git a/docs/about/images/issue-validation.png b/static/img/about/issue-validation.png similarity index 100% rename from docs/about/images/issue-validation.png rename to static/img/about/issue-validation.png diff --git a/docs/faq/images/cr_support_orgs_dark.png b/static/img/faq/cr_support_orgs_dark.png similarity index 100% rename from docs/faq/images/cr_support_orgs_dark.png rename to static/img/faq/cr_support_orgs_dark.png diff --git a/docs/faq/images/cr_support_orgs_light.png b/static/img/faq/cr_support_orgs_light.png similarity index 100% rename from docs/faq/images/cr_support_orgs_light.png rename to static/img/faq/cr_support_orgs_light.png diff --git a/docs/guides/images/api_keys.png b/static/img/guides/api_keys.png similarity index 100% rename from docs/guides/images/api_keys.png rename to static/img/guides/api_keys.png diff --git a/docs/guides/images/delete_account_dark.png b/static/img/guides/delete_account_dark.png similarity index 100% rename from docs/guides/images/delete_account_dark.png rename to static/img/guides/delete_account_dark.png diff --git a/docs/guides/images/delete_account_light.png b/static/img/guides/delete_account_light.png similarity index 100% rename from docs/guides/images/delete_account_light.png rename to static/img/guides/delete_account_light.png diff --git a/docs/integrations/images/admin-access-token.png b/static/img/integrations/admin-access-token.png similarity index 100% rename from docs/integrations/images/admin-access-token.png rename to static/img/integrations/admin-access-token.png diff --git a/docs/integrations/images/automated-onboarding.png b/static/img/integrations/automated-onboarding.png similarity index 100% rename from docs/integrations/images/automated-onboarding.png rename to static/img/integrations/automated-onboarding.png diff --git a/static/img/integrations/github-app-client-id-secret.png b/static/img/integrations/github-app-client-id-secret.png new file mode 100644 index 00000000..e9a7e3b1 Binary files /dev/null and b/static/img/integrations/github-app-client-id-secret.png differ diff --git a/static/img/integrations/github-create-oauth-app.png b/static/img/integrations/github-create-oauth-app.png new file mode 100644 index 00000000..d4c67f63 Binary files /dev/null and b/static/img/integrations/github-create-oauth-app.png differ diff --git a/static/img/integrations/github-oauth-client-id-secret.png b/static/img/integrations/github-oauth-client-id-secret.png new file mode 100644 index 00000000..ec7a8403 Binary files /dev/null and b/static/img/integrations/github-oauth-client-id-secret.png differ diff --git a/docs/integrations/images/gitlab_organization_user.png b/static/img/integrations/gitlab_organization_user.png similarity index 100% rename from docs/integrations/images/gitlab_organization_user.png rename to static/img/integrations/gitlab_organization_user.png diff --git a/docs/integrations/images/gitlab_user_choice.png b/static/img/integrations/gitlab_user_choice.png similarity index 100% rename from docs/integrations/images/gitlab_user_choice.png rename to static/img/integrations/gitlab_user_choice.png diff --git a/static/img/integrations/login-self-hosted-github.png b/static/img/integrations/login-self-hosted-github.png new file mode 100644 index 00000000..99f511c6 Binary files /dev/null and b/static/img/integrations/login-self-hosted-github.png differ diff --git a/static/img/integrations/login-self-hosted-gitlab.png b/static/img/integrations/login-self-hosted-gitlab.png new file mode 100644 index 00000000..4e2cd8d0 Binary files /dev/null and b/static/img/integrations/login-self-hosted-gitlab.png differ diff --git a/docs/integrations/images/logo.svg b/static/img/integrations/logo.svg similarity index 100% rename from docs/integrations/images/logo.svg rename to static/img/integrations/logo.svg diff --git a/docs/integrations/images/manual-onboarding.png b/static/img/integrations/manual-onboarding.png similarity index 100% rename from docs/integrations/images/manual-onboarding.png rename to static/img/integrations/manual-onboarding.png diff --git a/static/img/integrations/self-hosted-github-host-url.png b/static/img/integrations/self-hosted-github-host-url.png new file mode 100644 index 00000000..b8224720 Binary files /dev/null and b/static/img/integrations/self-hosted-github-host-url.png differ diff --git a/docs/integrations/images/self-hosted-gitlab-host-url.png b/static/img/integrations/self-hosted-gitlab-host-url.png similarity index 100% rename from docs/integrations/images/self-hosted-gitlab-host-url.png rename to static/img/integrations/self-hosted-gitlab-host-url.png diff --git a/docs/integrations/images/self-hosted-page.png b/static/img/integrations/self-hosted-page.png similarity index 100% rename from docs/integrations/images/self-hosted-page.png rename to static/img/integrations/self-hosted-page.png diff --git a/static/js/segment.js b/static/js/segment.js new file mode 100644 index 00000000..b8eb912b --- /dev/null +++ b/static/js/segment.js @@ -0,0 +1,83 @@ +!(function () { + var i = "analytics", + analytics = (window[i] = window[i] || []); + if (!analytics.initialize) + if (analytics.invoked) + window.console && + console.error && + console.error("Segment snippet included twice."); + else { + analytics.invoked = !0; + analytics.methods = [ + "trackSubmit", + "trackClick", + "trackLink", + "trackForm", + "pageview", + "identify", + "reset", + "group", + "track", + "ready", + "alias", + "debug", + "page", + "screen", + "once", + "off", + "on", + "addSourceMiddleware", + "addIntegrationMiddleware", + "setAnonymousId", + "addDestinationMiddleware", + "register", + ]; + analytics.factory = function (e) { + return function () { + if (window[i].initialized) + return window[i][e].apply(window[i], arguments); + var n = Array.prototype.slice.call(arguments); + if ( + ["track", "screen", "alias", "group", "page", "identify"].indexOf( + e + ) > -1 + ) { + var c = document.querySelector("link[rel='canonical']"); + n.push({ + __t: "bpc", + c: (c && c.getAttribute("href")) || void 0, + p: location.pathname, + u: location.href, + s: location.search, + t: document.title, + r: document.referrer, + }); + } + n.unshift(e); + analytics.push(n); + return analytics; + }; + }; + for (var n = 0; n < analytics.methods.length; n++) { + var key = analytics.methods[n]; + analytics[key] = analytics.factory(key); + } + analytics.load = function (key, n) { + var t = document.createElement("script"); + t.type = "text/javascript"; + t.async = !0; + t.setAttribute("data-global-segment-analytics-key", i); + t.src = + "https://cdn.segment.com/analytics.js/v1/" + + key + + "/analytics.min.js"; + var r = document.getElementsByTagName("script")[0]; + r.parentNode.insertBefore(t, r); + analytics._loadOptions = n; + }; + analytics._writeKey = "IvcQvqtKQS24hYl0lkuvsfFSCpCse4F8"; + analytics.SNIPPET_VERSION = "5.2.0"; + analytics.load("IvcQvqtKQS24hYl0lkuvsfFSCpCse4F8"); + analytics.page(); + } +})(); diff --git a/static/schema/schema.v2.json b/static/schema/schema.v2.json index 73a16435..e01cf4de 100644 --- a/static/schema/schema.v2.json +++ b/static/schema/schema.v2.json @@ -141,21 +141,26 @@ "default": "@coderabbitai", "description": "Add this keyword in the PR/MR title to auto-generate the title." }, - "poem": { + "review_status": { "type": "boolean", "default": true, - "description": "Generate a poem in the walkthrough comment." + "description": "Post review details on each review. Additionally, post a review status when a review is skipped in certain cases." }, - "review_status": { + "poem": { "type": "boolean", "default": true, - "description": "Post review details on each review. Additionally, post a review status when a review is skipped in certain cases." + "description": "Generate a poem in the walkthrough comment." }, "collapse_walkthrough": { "type": "boolean", "default": false, "description": "Generate walkthrough in a markdown collapsible section." }, + "sequence_diagrams": { + "type": "boolean", + "default": true, + "description": "Generate sequence diagrams in the walkthrough." + }, "path_filters": { "type": "array", "items": { @@ -196,12 +201,12 @@ "enabled": { "type": "boolean", "default": true, - "description": "Enable Automatic Review | Automatic code review" + "description": "Automatic Review | Automatic code review" }, "auto_incremental_review": { "type": "boolean", "default": true, - "description": "Enable Automatic Incremental Review | Automatic incremental code review on each push" + "description": "Automatic Incremental Review | Automatic incremental code review on each push" }, "ignore_title_keywords": { "type": "array", @@ -352,8 +357,7 @@ "items": { "type": "string" }, - "default": ["EN_UNPAIRED_BRACKETS", "EN_UNPAIRED_QUOTES"], - "description": "IDs of rules to be disabled." + "description": "IDs of rules to be disabled. Note: EN_UNPAIRED_BRACKETS, and EN_UNPAIRED_QUOTES are always disabled." }, "enabled_categories": { "type": "array", @@ -367,8 +371,7 @@ "items": { "type": "string" }, - "default": ["TYPOS", "TYPOGRAPHY", "CASING"], - "description": "IDs of categories to be disabled." + "description": "IDs of categories to be disabled. Note: TYPOS, TYPOGRAPHY, and CASING are always disabled." }, "enabled_only": { "type": "boolean", @@ -516,6 +519,36 @@ "additionalProperties": false, "default": {}, "description": "Checkov is a static code analysis tool for infrastructure-as-code files." + }, + "detekt": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Enable Detekt | Detekt is a static code analysis tool for Kotlin files." + }, + "config_file": { + "type": "string", + "description": "Optional path to the Detekt configuration file relative to the repository." + } + }, + "additionalProperties": false, + "default": {}, + "description": "Detekt is a static code analysis tool for Kotlin files." + }, + "eslint": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "default": true, + "description": "Enable ESLint | ESLint is a static code analysis tool for JavaScript files." + } + }, + "additionalProperties": false, + "default": {}, + "description": "ESLint is a static code analysis tool for JavaScript files." } }, "additionalProperties": false, @@ -542,6 +575,11 @@ "knowledge_base": { "type": "object", "properties": { + "opt_out": { + "type": "boolean", + "default": false, + "description": "Opt out | Opt out of all knowledge base features." + }, "learnings": { "type": "object", "properties": {