diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..a59e535d
--- /dev/null
+++ b/.editorconfig
@@ -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
diff --git a/.github/workflows/algolia.yml b/.github/workflows/algolia.yaml
similarity index 100%
rename from .github/workflows/algolia.yml
rename to .github/workflows/algolia.yaml
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 00000000..9a7f3698
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,6 @@
+.pnpm-store/
+build/
+dist/
+node_modules/
+package-lock.json
+pnpm-lock.yaml
diff --git a/.prettierrc.yaml b/.prettierrc.yaml
new file mode 100644
index 00000000..c0d38c98
--- /dev/null
+++ b/.prettierrc.yaml
@@ -0,0 +1,4 @@
+arrowParens: avoid
+semi: false
+trailingComma: all
+useTabs: true
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 00000000..79054369
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,7 @@
+{
+ "recommendations": [
+ "davidanson.vscode-markdownlint",
+ "editorconfig.editorconfig",
+ "esbenp.prettier-vscode"
+ ]
+}
diff --git a/babel.config.js b/babel.config.js
index e00595da..e7e30692 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,3 +1,3 @@
module.exports = {
- presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
-};
+ presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
+}
diff --git a/docs/Future Development.md b/docs/Future Development.md
index 50dcc836..50172ef0 100644
--- a/docs/Future Development.md
+++ b/docs/Future Development.md
@@ -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
diff --git a/docs/about/features.md b/docs/about/features.md
index 80ea221e..20345bc9 100644
--- a/docs/about/features.md
+++ b/docs/about/features.md
@@ -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.

@@ -38,16 +38,17 @@ additional comments generated for each review, and so on.
:::info
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:
@@ -85,8 +86,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.

diff --git a/docs/about/pricing.md b/docs/about/pricing.md
index 16cebf2d..0d8e25e0 100644
--- a/docs/about/pricing.md
+++ b/docs/about/pricing.md
@@ -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 |
---
diff --git a/docs/guides/delete-account.md b/docs/guides/delete-account.md
index cd612445..5bed9528 100644
--- a/docs/guides/delete-account.md
+++ b/docs/guides/delete-account.md
@@ -26,9 +26,7 @@ will permanently erase all data associated with your account, including:
### Deleting the CodeRabbit Account via the UI
:::info
-
Only accounts where the user has admin access will be deleted.
-
:::
Sign into your CodeRabbit account and navigate to the **Subscription** page.
diff --git a/docs/guides/review-instructions.md b/docs/guides/review-instructions.md
index 791a4e50..f86c5240 100644
--- a/docs/guides/review-instructions.md
+++ b/docs/guides/review-instructions.md
@@ -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
diff --git a/docs/introduction.md b/docs/introduction.md
index 1484af95..3e8eaaf0 100644
--- a/docs/introduction.md
+++ b/docs/introduction.md
@@ -8,14 +8,15 @@ 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.
+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.
:::
@@ -24,7 +25,7 @@ Developers can interact directly with the bot within the code, offering addition
## 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.
@@ -33,7 +34,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.
@@ -48,7 +49,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.
diff --git a/docs/platforms/platforms.md b/docs/platforms/platforms.md
index b38c7bef..038b329c 100644
--- a/docs/platforms/platforms.md
+++ b/docs/platforms/platforms.md
@@ -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
@@ -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
diff --git a/docs/self-hosted/azure-devops.md b/docs/self-hosted/azure-devops.md
index 2e229ec4..215bf924 100644
--- a/docs/self-hosted/azure-devops.md
+++ b/docs/self-hosted/azure-devops.md
@@ -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
@@ -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.
@@ -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.
@@ -86,9 +87,9 @@ LINEAR_PAT=[]
:::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.
:::
diff --git a/docs/self-hosted/github.md b/docs/self-hosted/github.md
index 2afcf984..d24cfcc6 100644
--- a/docs/self-hosted/github.md
+++ b/docs/self-hosted/github.md
@@ -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
---
@@ -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
@@ -98,18 +98,18 @@ JIRA_PAT=[]
LINEAR_PAT=[]
-OAUTH2_ENDPOINT=[]
+OAUTH2_ENDPOINT=[]
OAUTH2_CLIENT_ID=[]
OAUTH2_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.
:::
@@ -117,7 +117,7 @@ OAUTH2_CLIENT_SECRET=[]
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 /coderabbit-agent:latest
```
@@ -126,7 +126,7 @@ docker pull /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 /coderabbit-agent:latest
```
@@ -134,7 +134,7 @@ docker run --env-file .env --publish 127.0.0.1:8080:8080 /coder
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
```
diff --git a/docs/self-hosted/gitlab.md b/docs/self-hosted/gitlab.md
index dc738721..b0eaeb04 100644
--- a/docs/self-hosted/gitlab.md
+++ b/docs/self-hosted/gitlab.md
@@ -1,14 +1,14 @@
---
title: Use Self-Hosted CodeRabbit With GitLab
-sidebar_label: GitLab
+sidebar_label: GitLab
description: Instructions to self-host CodeRabbit and integrate it with GitLab.
sidebar_position: 2
---
## Create a GitLab 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
@@ -20,7 +20,7 @@ Generate a personal access token for the CodeRabbit user to be added in the `.en
**Necessary Scopes**:
-* `api`
+- `api`
Consult official CodeRabbitAI documentation for a detailed [guide](https://docs.coderabbit.ai/integrations/self-hosted-gitlab#generating-personal-access-token) on creating personal access tokens.
@@ -31,10 +31,10 @@ Consult official CodeRabbitAI documentation for a detailed [guide](https://docs.
3. **Generate and Save Secret Token**: Generate a secret token, add it to the webhook, and store it securely. This will be needed for the `.env` file as `GITLAB_WEBHOOK_SECRET` (you can use a single secret token for all projects).
4. Select triggers:
- * Push events
- * Comments
- * Issues events
- * Merge request events
+ - Push events
+ - Comments
+ - Issues events
+ - Merge request events
## Prepare an `.env` file
@@ -92,9 +92,9 @@ LINEAR_PAT=[]
:::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.
:::
diff --git a/docs/tools/cppcheck.md b/docs/tools/cppcheck.md
index 04ac66d1..105d7bbd 100644
--- a/docs/tools/cppcheck.md
+++ b/docs/tools/cppcheck.md
@@ -4,7 +4,7 @@ sidebar_label: Cppcheck
description: CodeRabbit's guide to Cppcheck.
---
-[Cppcheck](https://cppcheck.sourceforge.io/) is a static code analysis tool for the C and C++ programming languages.
+[Cppcheck](https://cppcheck.sourceforge.io/) is a static code analysis tool for the C and C++ programming languages.
## Files
diff --git a/docs/tools/tools.md b/docs/tools/tools.md
index 42c415bf..e58acd56 100644
--- a/docs/tools/tools.md
+++ b/docs/tools/tools.md
@@ -39,7 +39,7 @@ Remove extraneous f prefix
| Technology | Tools |
| :-------------------------- | :--------------------------------------------------------- |
| All | [Gitleaks][Gitleaks] |
-| CircleCi | [CircleCi][CircleCi] |
+| CircleCi | [CircleCi][CircleCi] |
| CloudFormation | [Checkov][Checkov] |
| Cppcheck | [Cppcheck][Cppcheck] |
| CSS | [Biome][Biome] |
@@ -55,7 +55,7 @@ Remove extraneous f prefix
| Markdown | [Markdownlint][Markdownlint], [LanguageTool][LanguageTool] |
| PHP | [PHPStan][PHPStan] |
| Plaintext | [LanguageTool][LanguageTool] |
-| Java | [PMD][PMD] |
+| Java | [PMD][PMD] |
| Protobuf | [Buf][Buf] |
| Python | [Ruff][Ruff] |
| Regal | [Regal][Regal] |
diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 96cdf6d1..97c6101f 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -1,199 +1,199 @@
-import { themes as prismThemes } from "prism-react-renderer";
-import { EnumChangefreq } from "sitemap";
+import { themes as prismThemes } from "prism-react-renderer"
+import { EnumChangefreq } from "sitemap"
-import type * as Preset from "@docusaurus/preset-classic";
-import type { Config } from "@docusaurus/types";
+import type * as Preset from "@docusaurus/preset-classic"
+import type { Config } from "@docusaurus/types"
-const baseUrl = "/";
+const baseUrl = "/"
const config: Config = {
- title: "CodeRabbit",
- staticDirectories: ["static"],
- tagline: "AI-powered Code Reviews",
- favicon: "img/favIcon.png",
-
- // Set the production url of your site here
- url: "https://docs.coderabbit.ai/",
- // Set the // pathname under which your site is served
- // For GitHub pages deployment, it is often '//'
- baseUrl: baseUrl,
-
- // GitHub pages deployment config.
- // If you aren't using GitHub pages, you don't need these.
- organizationName: "coderabbit", // Usually your GitHub org/user name.
- projectName: "coderabbit-docs", // Usually your repo name.
-
- onBrokenLinks: "throw",
- onBrokenMarkdownLinks: "throw",
- onDuplicateRoutes: "warn",
-
- // Even if you don't use internationalization, you can use this field to set
- // useful metadata like html lang. For example, if your site is Chinese, you
- // may want to replace "en" with "zh-Hans".
- i18n: {
- defaultLocale: "en",
- locales: ["en"],
- },
-
- plugins: [
- [
- "@docusaurus/plugin-client-redirects",
- {
- redirects: [
- {
- from: "/get-started",
- to: "/configure-coderabbit",
- },
- {
- from: "/guides/customize-coderabbit",
- to: "/configure-coderabbit",
- },
- {
- from: "/guides/prompt-customization",
- to: "/guides/review-instructions",
- },
- {
- from: "/guides/configure-coderabbit",
- to: "/configure-coderabbit",
- },
- {
- from: "/integrations/saas-gitlab",
- to: "/platforms/gitlab-com",
- },
- {
- from: "/integrations/self-hosted-gitlab",
- to: "/platforms/self-hosted-gitlab",
- },
- {
- from: "/integrations/self-hosted-github",
- to: "/platforms/github-enterprise-server",
- },
- {
- from: "/platforms/saas-azure-devops",
- to: "/platforms/azure-devops",
- },
- {
- from: "/platforms/saas-gitlab",
- to: "/platforms/gitlab-com",
- },
- {
- from: "/platforms/self-hosted-github",
- to: "/platforms/github-enterprise-server",
- },
- ],
- },
- ],
- async function myPlugin(context, options) {
- return {
- name: "docusaurus-tailwindcss",
- configurePostCss(postcssOptions) {
- // Appends TailwindCSS and AutoPrefixer.
- postcssOptions.plugins.push(require("tailwindcss"));
- postcssOptions.plugins.push(require("autoprefixer"));
- return postcssOptions;
- },
- };
- },
- ],
-
- presets: [
- [
- "classic",
- {
- docs: {
- editUrl: "https://github.com/coderabbitai/coderabbit-docs/edit/main/",
- sidebarPath: "./sidebars.ts",
- routeBasePath: "/",
- breadcrumbs: true,
- showLastUpdateTime: true,
- },
- blog: false,
- theme: {
- customCss: "./src/css/custom.css",
- },
- sitemap: {
- changefreq: "weekly" as EnumChangefreq,
- priority: 0.5,
- ignorePatterns: ["/tags/**"],
- filename: "sitemap.xml",
- },
- googleTagManager: {
- containerId: "GTM-5BWLXJRC",
- },
- } satisfies Preset.Options,
- ],
- ],
-
- themes: ["docusaurus-json-schema-plugin"],
-
- scripts: [
- "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",
- {
- 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,
- },
- ],
-
- themeConfig: {
- image: "img/preview.png",
- colorMode: {
- defaultMode: "light",
- disableSwitch: false,
- respectPrefersColorScheme: false,
- },
- docs: {
- sidebar: {
- hideable: true,
- },
- },
- metadata: [{ name: "twitter:card", content: "summary_large_image" }],
- navbar: {
- title: "",
- hideOnScroll: true,
- logo: {
- alt: "",
- src: "img/coderabbit_nav_logo.svg",
- href: "https://coderabbit.ai",
- },
- items: [],
- },
- prism: {
- theme: prismThemes.github,
- darkTheme: prismThemes.dracula,
- },
- algolia: {
- // The application ID provided by Algolia
- appId: "4MKM4DJT5D",
-
- // Public API key: it is safe to commit it
- apiKey: "b1d63b99cbda8ec3668777e644ecefa2",
-
- indexName: "coderabbit",
-
- // Optional: see doc section below
- contextualSearch: false,
-
- // Optional: Algolia search parameters
- searchParameters: {},
-
- // Optional: path for search page that enabled by default (`false` to disable it)
- searchPagePath: "search",
- },
- } satisfies Preset.ThemeConfig,
-};
-
-export default config;
+ title: "CodeRabbit",
+ staticDirectories: ["static"],
+ tagline: "AI-powered Code Reviews",
+ favicon: "img/favIcon.png",
+
+ // Set the production url of your site here
+ url: "https://docs.coderabbit.ai/",
+ // Set the // pathname under which your site is served
+ // For GitHub pages deployment, it is often '//'
+ baseUrl: baseUrl,
+
+ // GitHub pages deployment config.
+ // If you aren't using GitHub pages, you don't need these.
+ organizationName: "coderabbit", // Usually your GitHub org/user name.
+ projectName: "coderabbit-docs", // Usually your repo name.
+
+ onBrokenLinks: "throw",
+ onBrokenMarkdownLinks: "throw",
+ onDuplicateRoutes: "warn",
+
+ // Even if you don't use internationalization, you can use this field to set
+ // useful metadata like html lang. For example, if your site is Chinese, you
+ // may want to replace "en" with "zh-Hans".
+ i18n: {
+ defaultLocale: "en",
+ locales: ["en"],
+ },
+
+ plugins: [
+ [
+ "@docusaurus/plugin-client-redirects",
+ {
+ redirects: [
+ {
+ from: "/get-started",
+ to: "/configure-coderabbit",
+ },
+ {
+ from: "/guides/customize-coderabbit",
+ to: "/configure-coderabbit",
+ },
+ {
+ from: "/guides/prompt-customization",
+ to: "/guides/review-instructions",
+ },
+ {
+ from: "/guides/configure-coderabbit",
+ to: "/configure-coderabbit",
+ },
+ {
+ from: "/integrations/saas-gitlab",
+ to: "/platforms/gitlab-com",
+ },
+ {
+ from: "/integrations/self-hosted-gitlab",
+ to: "/platforms/self-hosted-gitlab",
+ },
+ {
+ from: "/integrations/self-hosted-github",
+ to: "/platforms/github-enterprise-server",
+ },
+ {
+ from: "/platforms/saas-azure-devops",
+ to: "/platforms/azure-devops",
+ },
+ {
+ from: "/platforms/saas-gitlab",
+ to: "/platforms/gitlab-com",
+ },
+ {
+ from: "/platforms/self-hosted-github",
+ to: "/platforms/github-enterprise-server",
+ },
+ ],
+ },
+ ],
+ async function myPlugin(context, options) {
+ return {
+ name: "docusaurus-tailwindcss",
+ configurePostCss(postcssOptions) {
+ // Appends TailwindCSS and AutoPrefixer.
+ postcssOptions.plugins.push(require("tailwindcss"))
+ postcssOptions.plugins.push(require("autoprefixer"))
+ return postcssOptions
+ },
+ }
+ },
+ ],
+
+ presets: [
+ [
+ "classic",
+ {
+ docs: {
+ editUrl: "https://github.com/coderabbitai/coderabbit-docs/edit/main/",
+ sidebarPath: "./sidebars.ts",
+ routeBasePath: "/",
+ breadcrumbs: true,
+ showLastUpdateTime: true,
+ },
+ blog: false,
+ theme: {
+ customCss: "./src/css/custom.css",
+ },
+ sitemap: {
+ changefreq: "weekly" as EnumChangefreq,
+ priority: 0.5,
+ ignorePatterns: ["/tags/**"],
+ filename: "sitemap.xml",
+ },
+ googleTagManager: {
+ containerId: "GTM-5BWLXJRC",
+ },
+ } satisfies Preset.Options,
+ ],
+ ],
+
+ themes: ["docusaurus-json-schema-plugin"],
+
+ scripts: [
+ "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",
+ {
+ 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,
+ },
+ ],
+
+ themeConfig: {
+ image: "img/preview.png",
+ colorMode: {
+ defaultMode: "light",
+ disableSwitch: false,
+ respectPrefersColorScheme: false,
+ },
+ docs: {
+ sidebar: {
+ hideable: true,
+ },
+ },
+ metadata: [{ name: "twitter:card", content: "summary_large_image" }],
+ navbar: {
+ title: "",
+ hideOnScroll: true,
+ logo: {
+ alt: "",
+ src: "img/coderabbit_nav_logo.svg",
+ href: "https://coderabbit.ai",
+ },
+ items: [],
+ },
+ prism: {
+ theme: prismThemes.github,
+ darkTheme: prismThemes.dracula,
+ },
+ algolia: {
+ // The application ID provided by Algolia
+ appId: "4MKM4DJT5D",
+
+ // Public API key: it is safe to commit it
+ apiKey: "b1d63b99cbda8ec3668777e644ecefa2",
+
+ indexName: "coderabbit",
+
+ // Optional: see doc section below
+ contextualSearch: false,
+
+ // Optional: Algolia search parameters
+ searchParameters: {},
+
+ // Optional: path for search page that enabled by default (`false` to disable it)
+ searchPagePath: "search",
+ },
+ } satisfies Preset.ThemeConfig,
+}
+
+export default config
diff --git a/package.json b/package.json
index 07520c20..339c457e 100644
--- a/package.json
+++ b/package.json
@@ -1,67 +1,67 @@
{
- "name": "@coderabbitai/coderabbit-docs",
- "version": "0.0.0",
- "private": true,
- "scripts": {
- "docusaurus": "docusaurus",
- "start": "docusaurus start",
- "build": "docusaurus build",
- "swizzle": "docusaurus swizzle",
- "deploy": "docusaurus deploy",
- "clear": "docusaurus clear",
- "serve": "docusaurus serve",
- "lint": "markdownlint-cli2 \"**/*.md\"",
- "lint:fix": "markdownlint-cli2 \"**/*.md\" --fix",
- "write-translations": "docusaurus write-translations",
- "write-heading-ids": "docusaurus write-heading-ids",
- "typecheck": "tsc --noEmit"
- },
- "dependencies": {
- "@docusaurus/core": "^3.1.1",
- "@docusaurus/plugin-client-redirects": "^3.1.1",
- "@docusaurus/plugin-content-blog": "^3.1.1",
- "@docusaurus/preset-classic": "^3.1.1",
- "@mdx-js/react": "^3.0.0",
- "autoprefixer": "^10.4.16",
- "clsx": "^2.0.0",
- "disqus-react": "^1.1.5",
- "docusaurus-json-schema-plugin": "^1.12.1",
- "postcss": "^8.4.32",
- "prism-react-renderer": "^2.3.0",
- "react-ace": "^12.0.0",
- "react-dom": "^18.0.0",
- "tailwindcss": "^3.4.0"
- },
- "devDependencies": {
- "@docusaurus/module-type-aliases": "^3.1.1",
- "@docusaurus/theme-classic": "^3.5.2",
- "@docusaurus/tsconfig": "^3.1.1",
- "@docusaurus/types": "^3.1.1",
- "@types/js-yaml": "^4.0.9",
- "@types/node": "^22.8.4",
- "@types/react": "^18.3.4",
- "ace-builds": "^1.36.1",
- "ajv": "^8.17.1",
- "js-yaml": "^4.1.0",
- "markdownlint-cli2": "^0.14.0",
- "prettier": "^3.3.3",
- "react": "^18.3.1",
- "sitemap": "^8.0.0",
- "typescript": "~5.2.2"
- },
- "browserslist": {
- "production": [
- ">0.5%",
- "not dead",
- "not op_mini all"
- ],
- "development": [
- "last 3 chrome version",
- "last 3 firefox version",
- "last 5 safari version"
- ]
- },
- "engines": {
- "node": ">=18.0"
- }
+ "name": "@coderabbitai/coderabbit-docs",
+ "version": "0.0.0",
+ "private": true,
+ "scripts": {
+ "docusaurus": "docusaurus",
+ "start": "docusaurus start",
+ "build": "docusaurus build",
+ "swizzle": "docusaurus swizzle",
+ "deploy": "docusaurus deploy",
+ "clear": "docusaurus clear",
+ "serve": "docusaurus serve",
+ "lint": "markdownlint-cli2 \"**/*.md\" && prettier --check .",
+ "lint:fix": "markdownlint-cli2 \"**/*.md\" --fix; prettier --list-different --write .",
+ "write-translations": "docusaurus write-translations",
+ "write-heading-ids": "docusaurus write-heading-ids",
+ "typecheck": "tsc --noEmit"
+ },
+ "dependencies": {
+ "@docusaurus/core": "^3.1.1",
+ "@docusaurus/plugin-client-redirects": "^3.1.1",
+ "@docusaurus/plugin-content-blog": "^3.1.1",
+ "@docusaurus/preset-classic": "^3.1.1",
+ "@mdx-js/react": "^3.0.0",
+ "autoprefixer": "^10.4.16",
+ "clsx": "^2.0.0",
+ "disqus-react": "^1.1.5",
+ "docusaurus-json-schema-plugin": "^1.12.1",
+ "postcss": "^8.4.32",
+ "prism-react-renderer": "^2.3.0",
+ "react-ace": "^12.0.0",
+ "react-dom": "^18.0.0",
+ "tailwindcss": "^3.4.0"
+ },
+ "devDependencies": {
+ "@docusaurus/module-type-aliases": "^3.1.1",
+ "@docusaurus/theme-classic": "^3.5.2",
+ "@docusaurus/tsconfig": "^3.1.1",
+ "@docusaurus/types": "^3.1.1",
+ "@types/js-yaml": "^4.0.9",
+ "@types/node": "^22.8.4",
+ "@types/react": "^18.3.4",
+ "ace-builds": "^1.36.1",
+ "ajv": "^8.17.1",
+ "js-yaml": "^4.1.0",
+ "markdownlint-cli2": "^0.14.0",
+ "prettier": "^3.3.3",
+ "react": "^18.3.1",
+ "sitemap": "^8.0.0",
+ "typescript": "~5.2.2"
+ },
+ "browserslist": {
+ "production": [
+ ">0.5%",
+ "not dead",
+ "not op_mini all"
+ ],
+ "development": [
+ "last 3 chrome version",
+ "last 3 firefox version",
+ "last 5 safari version"
+ ]
+ },
+ "engines": {
+ "node": ">=18.0"
+ }
}
diff --git a/plugins/blog-plugin.js b/plugins/blog-plugin.js
index 98c9e921..f847d186 100644
--- a/plugins/blog-plugin.js
+++ b/plugins/blog-plugin.js
@@ -1,68 +1,68 @@
-const blogPluginExports = require("@docusaurus/plugin-content-blog");
+const blogPluginExports = require("@docusaurus/plugin-content-blog")
-const defaultBlogPlugin = blogPluginExports.default;
+const defaultBlogPlugin = blogPluginExports.default
async function blogPluginExtended(...pluginOptions) {
- const blogPluginInstance = await defaultBlogPlugin(...pluginOptions);
+ const blogPluginInstance = await defaultBlogPlugin(...pluginOptions)
- return {
- // Add all properties of the default blog plugin so existing functionality is preserved
- ...blogPluginInstance,
- /**
- * Override the default `contentLoaded` hook to access blog posts data
- */
- contentLoaded: async function (data) {
- const { content, actions } = data;
+ return {
+ // Add all properties of the default blog plugin so existing functionality is preserved
+ ...blogPluginInstance,
+ /**
+ * Override the default `contentLoaded` hook to access blog posts data
+ */
+ contentLoaded: async function (data) {
+ const { content, actions } = data
- const allBlogPosts = content.blogPosts;
+ const allBlogPosts = content.blogPosts
- async function createRecentPostModule(blogPost, index) {
- return {
- // Inject the metadata you need for each recent blog post
- metadata: await actions.createData(
- `blogpost-metadata-${index}.json`,
- JSON.stringify({
- title: blogPost.metadata.title,
- description: blogPost.metadata.description,
- frontMatter: blogPost.metadata.frontMatter,
- image: blogPost.metadata.frontMatter.image,
- link: blogPost.metadata.permalink,
- date: blogPost.metadata.date,
- }),
- ),
+ async function createRecentPostModule(blogPost, index) {
+ return {
+ // Inject the metadata you need for each recent blog post
+ metadata: await actions.createData(
+ `blogpost-metadata-${index}.json`,
+ JSON.stringify({
+ title: blogPost.metadata.title,
+ description: blogPost.metadata.description,
+ frontMatter: blogPost.metadata.frontMatter,
+ image: blogPost.metadata.frontMatter.image,
+ link: blogPost.metadata.permalink,
+ date: blogPost.metadata.date,
+ }),
+ ),
- // Inject the MDX excerpt as a JSX component prop
- // (what's above the marker)
- Preview: {
- __import: true,
- // The markdown file for the blog post will be loaded by webpack
- path: blogPost.metadata.source,
- query: {
- truncated: true,
- },
- },
- };
- }
+ // Inject the MDX excerpt as a JSX component prop
+ // (what's above the marker)
+ Preview: {
+ __import: true,
+ // The markdown file for the blog post will be loaded by webpack
+ path: blogPost.metadata.source,
+ query: {
+ truncated: true,
+ },
+ },
+ }
+ }
- data.actions.addRoute({
- path: "/featured-posts",
- exact: true,
+ data.actions.addRoute({
+ path: "/featured-posts",
+ exact: true,
- component: "@site/src/components/FeaturedPosts/FeaturedPosts.tsx",
- modules: {
- blogPosts: await Promise.all(
- allBlogPosts.map(createRecentPostModule),
- ),
- },
- });
+ component: "@site/src/components/FeaturedPosts/FeaturedPosts.tsx",
+ modules: {
+ blogPosts: await Promise.all(
+ allBlogPosts.map(createRecentPostModule),
+ ),
+ },
+ })
- // Call the default overridden `contentLoaded` implementation
- return blogPluginInstance.contentLoaded(data);
- },
- };
+ // Call the default overridden `contentLoaded` implementation
+ return blogPluginInstance.contentLoaded(data)
+ },
+ }
}
module.exports = {
- ...blogPluginExports,
- default: blogPluginExtended,
-};
+ ...blogPluginExports,
+ default: blogPluginExtended,
+}
diff --git a/sidebars.ts b/sidebars.ts
index a5294e6c..fbd68074 100644
--- a/sidebars.ts
+++ b/sidebars.ts
@@ -1,4 +1,4 @@
-import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
+import type { SidebarsConfig } from "@docusaurus/plugin-content-docs"
/**
* Creating a sidebar enables you to:
@@ -11,27 +11,27 @@ import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";
Create as many sidebars as you want.
*/
const sidebars: SidebarsConfig = {
- docsSidebar: [
- {
- type: "autogenerated",
- dirName: ".",
- },
- {
- type: "link",
- label: "API Reference",
- href: "https://api.coderabbit.ai/api/swagger/"
- },
- {
- type: "link",
- label: "Blog",
- href: "https://blog.coderabbit.ai/blog",
- },
- {
- type: "link",
- label: "Discord",
- href: "https://discord.gg/GsXnASn26c",
- },
- ],
-};
+ docsSidebar: [
+ {
+ type: "autogenerated",
+ dirName: ".",
+ },
+ {
+ type: "link",
+ label: "API Reference",
+ href: "https://api.coderabbit.ai/api/swagger/",
+ },
+ {
+ type: "link",
+ label: "Blog",
+ href: "https://blog.coderabbit.ai/blog",
+ },
+ {
+ type: "link",
+ label: "Discord",
+ href: "https://discord.gg/GsXnASn26c",
+ },
+ ],
+}
-export default sidebars;
+export default sidebars
diff --git a/src/components/AiDisclaimer/AiDisclaimer.tsx b/src/components/AiDisclaimer/AiDisclaimer.tsx
index c443c791..6786278b 100644
--- a/src/components/AiDisclaimer/AiDisclaimer.tsx
+++ b/src/components/AiDisclaimer/AiDisclaimer.tsx
@@ -1,24 +1,24 @@
-import React from "react";
-import "./style.css";
-import WriteIcon from "@site/static/img/write-icon.svg";
+import React from "react"
+import "./style.css"
+import WriteIcon from "@site/static/img/write-icon.svg"
-type AiDisclaimerProps = {};
+type AiDisclaimerProps = {}
-export const AiDisclaimer: React.FC = (props) => {
- return (
-
-
-
-
-
Disclaimer
-
- This piece has been written by humans; it has also been reviewed and
- approved by humans. However, there was a touch of AI: it assisted us
- in correcting grammar, enhancing syntax, and improving sentence
- clarity. Thanks for reading!
-
+ This piece has been written by humans; it has also been reviewed and
+ approved by humans. However, there was a touch of AI: it assisted us
+ in correcting grammar, enhancing syntax, and improving sentence
+ clarity. Thanks for reading!
+