diff --git a/docs/guides/configure-coderabbit.md b/docs/guides/configure-coderabbit.md
deleted file mode 100644
index 615dd664..00000000
--- a/docs/guides/configure-coderabbit.md
+++ /dev/null
@@ -1,256 +0,0 @@
----
-title: Configure CodeRabbit
-sidebar_label: Configure CodeRabbit
-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: 2
----
-
-CodeRabbit offers various configuration options to tailor the reviews to your
-requirements. Configuration can be made using one of the below options, in order
-of precedence:
-
-1. Configure using CodeRabbit YAML file
-2. Configure using CodeRabbit UI for each repository
-3. Configure using CodeRabbit UI for the organization
-
-In this guide, we will cover the configuration using a YAML file.
-
-## Configure CodeRabbit using a YAML File {#yaml}
-
-You can add a `.coderabbit.yaml` configuration file to the root of your
-repositories. Below is a sample YAML file that can be used as a starting point
-and changed as needed:
-
-#### version 2: `Current`
-
-```yaml
-# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
-language: "en-US"
-early_access: false
-reviews:
- profile: "chill"
- request_changes_workflow: false
- high_level_summary: true
- poem: true
- review_status: true
- collapse_walkthrough: false
- auto_review:
- enabled: true
- drafts: false
-chat:
- auto_reply: true
-```
-
-YAML settings:
-
-1. **`language`**: Set the language for reviews using the ISO language code. For
- example, `"ja"` configures reviews in Japanese.
-2. **`tone_instructions`**: Set the tone for the reviews and the chat. Example:
- 'You must use talk like Mr. T. I pity the fool who doesn't!'
-3. **`early_access`**: Enroll in the early access program to take advantage of
- forthcoming features before their general release (default:`false`).
-4. **`enable_free_tier`**: Enable the free tier features for users who are not
- subscribed to a paid plan (default:`true`).
-5. **`reviews`**: Configures review settings.
-
- - **`profile`**: Select the reviewer profile between `assertive` and `chill`.
- The `assertive` profile posts more comments and nitpicks the code more
- aggressively, while the `chill` profile is more relaxed and posts fewer
- comments (default: `chill`).
- - **`request_changes_workflow`**: Enable request changes review workflow for
- CodeRabbit reviews (default: `false`).
- - **`high_level_summary`**: CodeRabbit generates a high-level summary of the
- changes in the PR/MR description (default:`true`).
- - **`high_level_summary_placeholder`**: Placeholder in the PR/MR description
- that gets replaced with the high-level summary
- (default:`@coderabbitai summary`).
- - **`auto_title_placeholder`**: Add this keyword in the PR/MR title to
- auto-generate the title. (default:`@coderabbitai`).
- - **`poem`**: Indicates whether a creative poem should be included in the
- review (default:`true`).
- - **`review_status`**: Include a review status when a review is skipped in
- certain cases (default:`true`).
- - **`collapse_walkthrough`**: Collapses the walkthrough comment
- (default:`false`).
- - **`path_filters`**: Specifies file patterns to exclude or include for a
- review, such as `!dist/**` and `src/**.tsx`, using glob notation. Example:
-
- ```yaml
- reviews:
- path_filters:
- - "!**/*.xml"
- - "!**/generated/**"
- ```
-
- - **`path_instructions`**: Provides specific additional guidelines for code
- review based on file paths. In the given example, JavaScript files are
- singled out for checks against the Google JavaScript style guide. File path
- accepts glob pattern. Example:
-
- ```yaml
- reviews:
- path_instructions:
- - path: "**/*.js"
- instructions:
- "Review the JavaScript code for conformity with the Google
- JavaScript style guide, highlighting any deviations."
- - path: "tests/**/*"
- instructions:
- "Assess the unit test code employing the Mocha testing framework.
- Test descriptions must be sufficiently detailed to clarify the
- purpose of each test."
- ```
-
- - **`auto_review`**: Manages settings for automatic code reviews.
-
- - **`enabled`**: Automatic code review (default: `true`).
- - **`auto_incremental_review`**: Automatic incremental code review(s) on
- each push (default: `true`).
- - **`ignore_title_keywords`**: Review will be ignored if a pull request
- title contains one of the list of keywords (case-insensitive).
- - **`labels`**: Review will be triggered if a pull request matches one of
- the list of labels (case-insensitive).
- - **`drafts`**: Determines whether draft pull requests are reviewed
- (default: `true`).
- - **`base_branches`**: A list of base branches for which the reviews will
- trigger, apart from the default branch. Accepts regex pattern. Example:
-
- ```yaml
- reviews:
- auto_review:
- base_branches:
- - develop
- - feat/.*
- ```
-
- - **`tools`**: Configures external tools integration settings.
-
- - **`ast-grep`**: Configuration for `ast-grep` integration.
- - **`rule_dirs`**: The directory name where the custom `ast-grep` rules
- are stored.
- - **`util_dirs`**: The directory name where the custom `ast-grep` utils
- are stored.
- - **`essential_rules`**: Enable the
- [`ast-grep-essentials`](https://github.com/coderabbitai/ast-grep-essentials)
- package, which contains community-driven security and best practice
- rules. Defaults to `true`.
- - **`packages`**: A package allows you to share rules across multiple
- projects. Essentially, a package is a collection of `ast-grep` rules.
- - **`github-checks`**: Configuration for GitHub Checks integration.
- - **`enabled`**: Enable integration, defaults to true.
- - **`timeout_ms`**: Time in milliseconds to wait for all GitHub Checks to
- conclude, defaults to 90000 (1.5 minutes), maximum is 300000 (5
- minutes), minimum is 0 (no timeout).
- - **`markdownlint`**: Configuration for `markdownlint` integration.
- - **`enabled`**: Enable integration, defaults to true.
- - **`ruff`**: Configuration for `ruff` integration.
- - **`enabled`**: Enable integration, defaults to true.
- - **`shellcheck`**: Configuration for `shellcheck` integration.
- - **`enabled`**: Enable integration, defaults to true.
- - **`biome`**: Configuration for `biome` integration.
- - **`enabled`**: Enable integration, defaults to true.
- - **`hadolint`**: Configuration for `hadolint` integration.
- - **`enabled`**: Enable integration, defaults to true.
- - **`golangci-lint`**: Configuration for `golangci-lint` integration.
- - **`enabled`**: Enable integration, defaults to true.
- - **`swiftlint`**: Configuration for `swiftlint` integration.
- - **`enabled`**: Enable integration, defaults to true.
- - **`config_file`**: Path to the `swiftlint` configuration file relative
- to the repository. This is useful when the configuration file is named
- differently than the default `.swiftlint.yml` or `.swiftlint.yaml`.
- - **`phpstan`**: Configuration for `phpstan` integration.
- - **`enabled`**: Enable integration, defaults to true. PHPStan requires
- [config file](https://phpstan.org/config-reference#config-file) in your
- repository root.
- - **`level`**: The
- [rule level](https://phpstan.org/user-guide/rule-levels) to run.
- Default is "1".
- - **`languagetool`**: Configuration for `languagetool` integration.
-
- - **`enabled`**: Enable integration, defaults to true.
- - **`level`**: The level of the rule. It can be one `default` or `picky`.
- If set to `picky`, additional rules will be activated, i.e. rules that
- you might only find useful when checking formal text.
- - **`enabled_rules`**: IDs of rules to be enabled. The rule won't run
- unless 'level' is set to a level that activates the rule.
- - **`disabled_rules`**: IDs of rules to be disabled.
- - **`enabled_categories`**: IDs of categories to be enabled.
- - **`disabled_categories`**: IDs of categories to be disabled.
- - **`enabled_only`**: Only the rules and categories whose IDs are
- specified with `enabled_rules` or `enabled_categories` are enabled.
-
- ```yaml
- reviews:
- tools:
- ast-grep:
- rule_dirs:
- - "rules"
- util_dirs:
- - "utils"
- essential_rules: true
- packages:
- - "my-awesome-org/my-awesome-package" # public GitHub repository that contains ast-grep rules
- github-checks:
- enabled: true
- timeout_ms: 90000
- markdownlint:
- enabled: true
- ruff:
- enabled: true
- shellcheck:
- enabled: true
- biome:
- enabled: true
- hadolint:
- enabled: true
- golangci-lint:
- enabled: true
- swiftlint:
- enabled: true
- config_file: ".custom-swiftlint.yaml"
- phpstan:
- enabled: true
- level: "1"
- languagetool:
- enabled: true
- enabled_only: false
- level: default
- enabled_categories:
- - "TON_ACADEMIC"
- - "CASING"
- ```
-
-6. **`knowledge_base`**: Configures knowledge base settings.
-
- - **`learnings`**: Configures learnings settings.
- - **`scope`**: Specify the scope of learnings to use for the knowledge
- base. `local` uses the repository's learnings, `global` uses the
- organization's learnings, and `auto` uses repository's learnings for
- public repositories and organization's learnings for private
- repositories. Default is `auto`.
- - **`issues`**: Configures issues settings.
- - **`scope`**: Specify the scope of git platform (GitHub/GitLab) issues to
- use for the knowledge base. `local` uses the repository's issues,
- `global` uses the organization's issues, and `auto` uses repository's
- issues for public repositories and organization's issues for private
- repositories. Default is `auto`.
- - **`jira`**: Configures Jira settings.
- - **`project_keys`**: A list of Jira project keys to use for the knowledge
- base. If not provided, all projects will be used.
- - **`linear`**: Configures Linear settings.
- - **`team_keys`**: A list of Linear team keys to use for the knowledge
- base. If not provided, all teams will be used.
-
-7. **`chat`**: Defines the behavior of CodeRabbit's bot in conversations.
- - **`auto_reply`**: The bot automatically replies without the need of the
- user tagging it (default: `true`).
-
-Refer:
-[CodeRabbit Configuration Schema](https://coderabbit.ai/integrations/schema.v2.json).
-
-Please note that code reviews commence with new pull requests or incremental
-commits to existing pull requests once the CodeRabbit app is installed. Should
-you have any questions or require assistance, our support team is here to help.
diff --git a/docs/guides/configure-coderabbit.mdx b/docs/guides/configure-coderabbit.mdx
new file mode 100644
index 00000000..83b766ef
--- /dev/null
+++ b/docs/guides/configure-coderabbit.mdx
@@ -0,0 +1,36 @@
+---
+title: Configure CodeRabbit
+sidebar_label: Configure CodeRabbit
+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: 2
+---
+
+import SchemaViewer from "@site/src/components/SchemaViewer";
+
+CodeRabbit offers various configuration options to tailor the reviews to your
+requirements. Configuration can be made using one of the below options, in order
+of precedence:
+
+1. Configure using CodeRabbit YAML file
+2. Configure using CodeRabbit UI for each repository
+3. Configure using CodeRabbit UI for the organization
+
+In this guide, we will cover the configuration using a YAML file.
+
+## Configure CodeRabbit using a YAML File
+
+You can add a `.coderabbit.yaml` configuration file to the root of your
+repositories. Below is a sample YAML file that can be used as a starting point
+and changed as needed:
+
+
+
+Refer:
+[CodeRabbit Configuration Schema](https://coderabbit.ai/integrations/schema.v2.json).
+
+Please note that code reviews commence with new pull requests or incremental
+commits to existing pull requests once the CodeRabbit app is installed. Should
+you have any questions or require assistance, our support team is here to help.
diff --git a/docs/guides/review-instructions.md b/docs/guides/review-instructions.md
index 8c71b86e..6b155ff5 100644
--- a/docs/guides/review-instructions.md
+++ b/docs/guides/review-instructions.md
@@ -9,7 +9,7 @@ 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.mdx).
### Path-based instructions {#path-based}
diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 29beb476..a46dfe35 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -111,6 +111,8 @@ const config: Config = {
],
],
+ 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",
@@ -167,9 +169,6 @@ const config: Config = {
// Optional: path for search page that enabled by default (`false` to disable it)
searchPagePath: "search",
-
- // Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
- insights: false,
},
} satisfies Preset.ThemeConfig,
};
diff --git a/package-lock.json b/package-lock.json
index a30324b7..cf532429 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,6 +16,7 @@
"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": "^18.0.0",
@@ -3127,6 +3128,70 @@
"node": ">=14"
}
},
+ "node_modules/@stoplight/json": {
+ "version": "3.21.0",
+ "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.21.0.tgz",
+ "integrity": "sha512-5O0apqJ/t4sIevXCO3SBN9AHCEKKR/Zb4gaj7wYe5863jme9g02Q0n/GhM7ZCALkL+vGPTe4ZzTETP8TFtsw3g==",
+ "dependencies": {
+ "@stoplight/ordered-object-literal": "^1.0.3",
+ "@stoplight/path": "^1.3.2",
+ "@stoplight/types": "^13.6.0",
+ "jsonc-parser": "~2.2.1",
+ "lodash": "^4.17.21",
+ "safe-stable-stringify": "^1.1"
+ },
+ "engines": {
+ "node": ">=8.3.0"
+ }
+ },
+ "node_modules/@stoplight/json-ref-resolver": {
+ "version": "3.1.6",
+ "resolved": "https://registry.npmjs.org/@stoplight/json-ref-resolver/-/json-ref-resolver-3.1.6.tgz",
+ "integrity": "sha512-YNcWv3R3n3U6iQYBsFOiWSuRGE5su1tJSiX6pAPRVk7dP0L7lqCteXGzuVRQ0gMZqUl8v1P0+fAKxF6PLo9B5A==",
+ "dependencies": {
+ "@stoplight/json": "^3.21.0",
+ "@stoplight/path": "^1.3.2",
+ "@stoplight/types": "^12.3.0 || ^13.0.0",
+ "@types/urijs": "^1.19.19",
+ "dependency-graph": "~0.11.0",
+ "fast-memoize": "^2.5.2",
+ "immer": "^9.0.6",
+ "lodash": "^4.17.21",
+ "tslib": "^2.6.0",
+ "urijs": "^1.19.11"
+ },
+ "engines": {
+ "node": ">=8.3.0"
+ }
+ },
+ "node_modules/@stoplight/ordered-object-literal": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@stoplight/ordered-object-literal/-/ordered-object-literal-1.0.5.tgz",
+ "integrity": "sha512-COTiuCU5bgMUtbIFBuyyh2/yVVzlr5Om0v5utQDgBCuQUOPgU1DwoffkTfg4UBQOvByi5foF4w4T+H9CoRe5wg==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@stoplight/path": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/@stoplight/path/-/path-1.3.2.tgz",
+ "integrity": "sha512-lyIc6JUlUA8Ve5ELywPC8I2Sdnh1zc1zmbYgVarhXIp9YeAB0ReeqmGEOWNtlHkbP2DAA1AL65Wfn2ncjK/jtQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@stoplight/types": {
+ "version": "13.20.0",
+ "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.20.0.tgz",
+ "integrity": "sha512-2FNTv05If7ib79VPDA/r9eUet76jewXFH2y2K5vuge6SXbRHtWBhcaRmu+6QpF4/WRNoJj5XYRSwLGXDxysBGA==",
+ "dependencies": {
+ "@types/json-schema": "^7.0.4",
+ "utility-types": "^3.10.0"
+ },
+ "engines": {
+ "node": "^12.20 || >=14.13"
+ }
+ },
"node_modules/@svgr/babel-plugin-add-jsx-attribute": {
"version": "6.5.1",
"resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.5.1.tgz",
@@ -3720,6 +3785,11 @@
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz",
"integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ=="
},
+ "node_modules/@types/urijs": {
+ "version": "1.19.25",
+ "resolved": "https://registry.npmjs.org/@types/urijs/-/urijs-1.19.25.tgz",
+ "integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg=="
+ },
"node_modules/@types/ws": {
"version": "8.5.10",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz",
@@ -5588,6 +5658,14 @@
"node": ">= 0.8"
}
},
+ "node_modules/dependency-graph": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz",
+ "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==",
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
"node_modules/dequal": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
@@ -5710,6 +5788,22 @@
"node": ">=6"
}
},
+ "node_modules/docusaurus-json-schema-plugin": {
+ "version": "1.12.1",
+ "resolved": "https://registry.npmjs.org/docusaurus-json-schema-plugin/-/docusaurus-json-schema-plugin-1.12.1.tgz",
+ "integrity": "sha512-akBecRrvYab85Bhuo3UQ3nHZrc0sf8SQWSCqmfwohxR4ZzwKLS8TIoxbGww+IfTUm5EVFw4KRAYh74Y9W19ibg==",
+ "dependencies": {
+ "@stoplight/json-ref-resolver": "^3.1.5",
+ "monaco-editor": "^0.44.0",
+ "monaco-editor-webpack-plugin": "^7.0.1",
+ "react-monaco-editor": "^0.55.0"
+ },
+ "peerDependencies": {
+ "@docusaurus/core": "^3.0.0",
+ "@docusaurus/theme-classic": "^3.0.0",
+ "react": ">=17 <= 18"
+ }
+ },
"node_modules/dom-converter": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",
@@ -6261,6 +6355,11 @@
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
},
+ "node_modules/fast-memoize": {
+ "version": "2.5.2",
+ "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz",
+ "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw=="
+ },
"node_modules/fast-url-parser": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz",
@@ -8088,6 +8187,11 @@
"node": ">=6"
}
},
+ "node_modules/jsonc-parser": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz",
+ "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w=="
+ },
"node_modules/jsonfile": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
@@ -10499,6 +10603,23 @@
"node": ">=16 || 14 >=14.17"
}
},
+ "node_modules/monaco-editor": {
+ "version": "0.44.0",
+ "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.44.0.tgz",
+ "integrity": "sha512-5SmjNStN6bSuSE5WPT2ZV+iYn1/yI9sd4Igtk23ChvqB7kDk9lZbB9F5frsuvpB+2njdIeGGFf2G4gbE6rCC9Q=="
+ },
+ "node_modules/monaco-editor-webpack-plugin": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-7.1.0.tgz",
+ "integrity": "sha512-ZjnGINHN963JQkFqjjcBtn1XBtUATDZBMgNQhDQwd78w2ukRhFXAPNgWuacaQiDZsUr4h1rWv5Mv6eriKuOSzA==",
+ "dependencies": {
+ "loader-utils": "^2.0.2"
+ },
+ "peerDependencies": {
+ "monaco-editor": ">= 0.31.0",
+ "webpack": "^4.5.0 || 5.x"
+ }
+ },
"node_modules/mrmime": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz",
@@ -12295,6 +12416,19 @@
"webpack": ">=4.41.1 || 5.x"
}
},
+ "node_modules/react-monaco-editor": {
+ "version": "0.55.0",
+ "resolved": "https://registry.npmjs.org/react-monaco-editor/-/react-monaco-editor-0.55.0.tgz",
+ "integrity": "sha512-GdEP0Q3Rn1dczfKEEyY08Nes5plWwIYU4sWRBQO0+jsQWQsKMHKCC6+hPRwR7G/4aA3V/iU9jSmWPzVJYMVFSQ==",
+ "dependencies": {
+ "prop-types": "^15.8.1"
+ },
+ "peerDependencies": {
+ "@types/react": ">=16 <= 18",
+ "monaco-editor": "^0.44.0",
+ "react": ">=16 <= 18"
+ }
+ },
"node_modules/react-router": {
"version": "5.3.4",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz",
@@ -12889,6 +13023,11 @@
}
]
},
+ "node_modules/safe-stable-stringify": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz",
+ "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw=="
+ },
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
@@ -14447,6 +14586,11 @@
"node": ">=6"
}
},
+ "node_modules/urijs": {
+ "version": "1.19.11",
+ "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz",
+ "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ=="
+ },
"node_modules/url-loader": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz",
diff --git a/package.json b/package.json
index 2c5ce110..3c82d516 100644
--- a/package.json
+++ b/package.json
@@ -1,53 +1,54 @@
{
- "name": "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",
- "write-translations": "docusaurus write-translations",
- "write-heading-ids": "docusaurus write-heading-ids",
- "typecheck": "tsc"
- },
- "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",
- "postcss": "^8.4.32",
- "prism-react-renderer": "^2.3.0",
- "react": "^18.0.0",
- "react-dom": "^18.0.0",
- "tailwindcss": "^3.4.0"
- },
- "devDependencies": {
- "@docusaurus/module-type-aliases": "^3.1.1",
- "@docusaurus/tsconfig": "^3.1.1",
- "@docusaurus/types": "^3.1.1",
- "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": "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",
+ "write-translations": "docusaurus write-translations",
+ "write-heading-ids": "docusaurus write-heading-ids",
+ "typecheck": "tsc"
+ },
+ "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": "^18.0.0",
+ "react-dom": "^18.0.0",
+ "tailwindcss": "^3.4.0"
+ },
+ "devDependencies": {
+ "@docusaurus/module-type-aliases": "^3.1.1",
+ "@docusaurus/tsconfig": "^3.1.1",
+ "@docusaurus/types": "^3.1.1",
+ "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/src/components/SchemaViewer.tsx b/src/components/SchemaViewer.tsx
new file mode 100644
index 00000000..55c6a3f4
--- /dev/null
+++ b/src/components/SchemaViewer.tsx
@@ -0,0 +1,6 @@
+import Schema from "@site/static/schema/schema.v2.json";
+import JSONSchemaViewer from "@theme/JSONSchemaViewer";
+
+export default function Viewer(): JSX.Element {
+ return ;
+}
diff --git a/static/schema/schema.v2.json b/static/schema/schema.v2.json
new file mode 100644
index 00000000..7ec8d834
--- /dev/null
+++ b/static/schema/schema.v2.json
@@ -0,0 +1,584 @@
+{
+ "$ref": "#/definitions/schema",
+ "definitions": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "language": {
+ "type": "string",
+ "enum": [
+ "de",
+ "de-DE",
+ "de-AT",
+ "de-CH",
+ "en",
+ "en-US",
+ "en-AU",
+ "en-GB",
+ "en-CA",
+ "en-NZ",
+ "en-ZA",
+ "es",
+ "es-AR",
+ "fr",
+ "fr-CA",
+ "fr-CH",
+ "fr-BE",
+ "nl",
+ "nl-BE",
+ "pt-AO",
+ "pt",
+ "pt-BR",
+ "pt-MZ",
+ "pt-PT",
+ "ar",
+ "ast-ES",
+ "ast",
+ "be-BY",
+ "be",
+ "br-FR",
+ "br",
+ "ca-ES",
+ "ca",
+ "ca-ES-valencia",
+ "ca-ES-balear",
+ "da-DK",
+ "da",
+ "de-DE-x-simple-language",
+ "el-GR",
+ "el",
+ "eo",
+ "fa",
+ "ga-IE",
+ "ga",
+ "gl-ES",
+ "gl",
+ "it",
+ "ja-JP",
+ "ja",
+ "km-KH",
+ "km",
+ "ko-KR",
+ "ko",
+ "pl-PL",
+ "pl",
+ "ro-RO",
+ "ro",
+ "ru-RU",
+ "ru",
+ "sk-SK",
+ "sk",
+ "sl-SI",
+ "sl",
+ "sv",
+ "ta-IN",
+ "ta",
+ "tl-PH",
+ "tl",
+ "tr",
+ "uk-UA",
+ "uk",
+ "zh-CN",
+ "zh",
+ "crh-UA",
+ "crh",
+ "nb",
+ "no",
+ "nl-NL",
+ "de-DE-x-simple-language-DE",
+ "es-ES",
+ "it-IT",
+ "fa-IR",
+ "sv-SE",
+ "de-LU",
+ "fr-FR"
+ ],
+ "default": "en-US",
+ "description": "Set the language for reviews by using the corresponding ISO language code."
+ },
+ "tone_instructions": {
+ "type": "string",
+ "maxLength": 250,
+ "default": "",
+ "description": "Set the tone of reviews and chat. Example: 'You must use talk like Mr. T. I pity the fool who doesn't!'"
+ },
+ "early_access": {
+ "type": "boolean",
+ "default": false,
+ "description": "Enable early-access features."
+ },
+ "enable_free_tier": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable free tier features for users not on a paid plan."
+ },
+ "reviews": {
+ "type": "object",
+ "properties": {
+ "profile": {
+ "type": "string",
+ "enum": ["chill", "assertive"],
+ "default": "chill",
+ "description": "Set the profile for reviews."
+ },
+ "request_changes_workflow": {
+ "type": "boolean",
+ "default": false,
+ "description": "Approve the review once CodeRabbit's comments are resolved. Note: In GitLab, all discussions must be resolved."
+ },
+ "high_level_summary": {
+ "type": "boolean",
+ "default": true,
+ "description": "Generate a high level summary of the changes in the PR/MR description."
+ },
+ "high_level_summary_placeholder": {
+ "type": "string",
+ "default": "@coderabbitai summary",
+ "description": "Placeholder in the PR/MR description that gets replaced with the high level summary."
+ },
+ "auto_title_placeholder": {
+ "type": "string",
+ "default": "@coderabbitai",
+ "description": "Add this keyword in the PR/MR title to auto-generate the title."
+ },
+ "poem": {
+ "type": "boolean",
+ "default": true,
+ "description": "Generate a poem in the walkthrough comment."
+ },
+ "review_status": {
+ "type": "boolean",
+ "default": true,
+ "description": "Post review details on each review. Additionally, post a review status when a review is skipped in certain cases."
+ },
+ "collapse_walkthrough": {
+ "type": "boolean",
+ "default": false,
+ "description": "Generate walkthrough in a markdown collapsible section."
+ },
+ "path_filters": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": [],
+ "description": "Specify file patterns to exclude or include for a review. Accepts glob patterns. Example: !dist/**, src/**"
+ },
+ "path_instructions": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "path": {
+ "type": "string",
+ "description": "File path glob pattern. Example: **/*.js"
+ },
+ "instructions": {
+ "type": "string",
+ "maxLength": 3000,
+ "description": "Provides specific additional guidelines for code review based on file paths."
+ }
+ },
+ "required": ["path", "instructions"],
+ "additionalProperties": false
+ },
+ "default": [],
+ "description": "Path Instructions | Provide specific additional guidelines for code review based on file paths."
+ },
+ "abort_on_close": {
+ "type": "boolean",
+ "default": true,
+ "description": "Abort the in-progress review if the pull request is closed or merged."
+ },
+ "auto_review": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable Automatic Review | Automatic code review"
+ },
+ "auto_incremental_review": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable Automatic Incremental Review | Automatic incremental code review on each push"
+ },
+ "ignore_title_keywords": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": [],
+ "description": "Ignore reviewing if the title of the pull request contains any of these keywords (case-insensitive)."
+ },
+ "labels": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": [],
+ "description": "Restrict automatic reviews to only those pull requests that match one of the specified labels."
+ },
+ "drafts": {
+ "type": "boolean",
+ "default": false,
+ "description": "Review draft PRs/MRs."
+ },
+ "base_branches": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": [],
+ "description": "Base branches (other than the default branch) to review. Accepts regex patterns."
+ }
+ },
+ "additionalProperties": false,
+ "default": {}
+ },
+ "tools": {
+ "type": "object",
+ "properties": {
+ "ast-grep": {
+ "type": "object",
+ "properties": {
+ "rule_dirs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "List of rules directories."
+ },
+ "util_dirs": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "List of utils directories."
+ },
+ "essential_rules": {
+ "type": "boolean",
+ "default": true,
+ "description": "Use ast-grep essentials package."
+ },
+ "packages": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": [],
+ "description": "Predefined packages to be used."
+ }
+ },
+ "additionalProperties": false,
+ "description": "ast-grep is a code analysis tool that helps you to find patterns in your codebase using abstract syntax trees patterns."
+ },
+ "shellcheck": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable ShellCheck | ShellCheck is a static analysis tool that finds bugs in your shell. | Enable shellcheck integration."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "Shellcheck is a static analysis tool that finds bugs in your shell scripts."
+ },
+ "ruff": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable Ruff | Ruff is a Python linter and code formatter. | Enable ruff integration."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "Ruff is a Python linter and code formatter."
+ },
+ "markdownlint": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable Markdownlint\n\t\t\t\t| Markdownlint is a static analysis tool for Node.js with a library of rules to enforce standards and consistency for Markdown files.\n\t\t\t\t| Enable markdownlint integration."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "Markdownlint is a static analysis tool to enforce standards and consistency for Markdown files."
+ },
+ "github-checks": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable GitHub Checks\n\t\t\t| Enable integration, defaults to true\n\t\t\t| Enable GitHub Checks integration."
+ },
+ "timeout_ms": {
+ "type": "number",
+ "maximum": 300000,
+ "minimum": 0,
+ "default": 90000,
+ "description": "Time in milliseconds to wait for all GitHub Checks to conclude."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "GitHub Checks integration configuration."
+ },
+ "languagetool": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable LanguageTool | Enable LanguageTool integration."
+ },
+ "enabled_rules": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "IDs of rules to be enabled. The rule won't run unless 'level' is set to a level that activates the rule."
+ },
+ "disabled_rules": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": ["EN_UNPAIRED_BRACKETS", "EN_UNPAIRED_QUOTES"],
+ "description": "IDs of rules to be disabled."
+ },
+ "enabled_categories": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "IDs of categories to be enabled."
+ },
+ "disabled_categories": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": ["TYPOS", "TYPOGRAPHY", "CASING"],
+ "description": "IDs of categories to be disabled."
+ },
+ "enabled_only": {
+ "type": "boolean",
+ "default": false,
+ "description": "Only the rules and categories whose IDs are specified with 'enabledRules' or 'enabledCategories' are enabled."
+ },
+ "level": {
+ "type": "string",
+ "enum": ["default", "picky"],
+ "default": "default",
+ "description": "If set to 'picky', additional rules will be activated, i.e. rules that you might only find useful when checking formal text."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "LanguageTool is a style and grammar checker for 30+ languages."
+ },
+ "biome": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable Biome | Biome is a fast formatter, linter, and analyzer for web projects. | Enable Biome integration."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "Biome is a fast formatter, linter, and analyzer for web projects."
+ },
+ "hadolint": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable Hadolint | Hadolint is a Dockerfile linter. | Enable Hadolint integration."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "Hadolint is a Dockerfile linter."
+ },
+ "swiftlint": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable SwiftLint | SwiftLint is a Swift linter. | Enable SwiftLint integration."
+ },
+ "config_file": {
+ "type": "string",
+ "description": "Optional path to the SwiftLint configuration file relative to the repository. This is useful when the configuration file is named differently than the default '.swiftlint.yml' or '.swiftlint.yaml'."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "SwiftLint integration configuration object."
+ },
+ "phpstan": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable PHPStan | PHPStan requires [config file](https://phpstan.org/config-reference#config-file) in your repository root."
+ },
+ "level": {
+ "type": "string",
+ "enum": [
+ "default",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "max"
+ ],
+ "default": "default",
+ "description": "Level | Specify the [rule level](https://phpstan.org/user-guide/rule-levels) to run."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "PHPStan is a tool to analyze PHP code."
+ },
+ "golangci-lint": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable golangci-lint | golangci-lint is a fast linters runner for Go. | Enable golangci-lint integration."
+ },
+ "config_file": {
+ "type": "string",
+ "description": "Optional path to the golangci-lint configuration file relative to the repository. Useful when the configuration file is named differently than the default '.golangci.yml', '.golangci.yaml', '.golangci.toml', '.golangci.json'."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "golangci-lint is a fast linters runner for Go."
+ },
+ "gitleaks": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable Gitleaks | Gitleaks is a secret scanner. | Enable Gitleaks integration."
+ }
+ },
+ "additionalProperties": false,
+ "default": {},
+ "description": "Gitleaks is a secret scanner."
+ }
+ },
+ "additionalProperties": false,
+ "description": "Tools that provide additional context to code reviews.",
+ "default": {}
+ }
+ },
+ "additionalProperties": false,
+ "description": "Settings related to reviews.",
+ "default": {}
+ },
+ "chat": {
+ "type": "object",
+ "properties": {
+ "auto_reply": {
+ "type": "boolean",
+ "default": true,
+ "description": "Enable the bot to reply automatically without requiring the user to tag it."
+ }
+ },
+ "additionalProperties": false,
+ "default": {}
+ },
+ "knowledge_base": {
+ "type": "object",
+ "properties": {
+ "learnings": {
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "string",
+ "enum": ["local", "global", "auto"],
+ "default": "auto",
+ "description": "Learnings | Specify the scope of learnings to use for the knowledge base. 'local' uses the repository's learnings, 'global' uses the organization's learnings, and 'auto' uses repository's learnings for public repositories and organization's learnings for private repositories."
+ }
+ },
+ "additionalProperties": false,
+ "default": {}
+ },
+ "issues": {
+ "type": "object",
+ "properties": {
+ "scope": {
+ "type": "string",
+ "enum": ["local", "global", "auto"],
+ "default": "auto",
+ "description": "Issues | Specify the scope of git platform (GitHub/GitLab) issues to use for the knowledge base. 'local' uses the repository's issues, 'global' uses the organization's issues, and 'auto' uses repository's issues for public repositories and organization's issues for private repositories."
+ }
+ },
+ "additionalProperties": false,
+ "default": {}
+ },
+ "jira": {
+ "type": "object",
+ "properties": {
+ "project_keys": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": [],
+ "description": "Jira Project Keys | Specify the Jira project keys to use for the knowledge base."
+ }
+ },
+ "additionalProperties": false,
+ "default": {}
+ },
+ "linear": {
+ "type": "object",
+ "properties": {
+ "team_keys": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "default": [],
+ "description": "Linear Team Keys | Specify the Linear project keys to use for the knowledge base."
+ }
+ },
+ "additionalProperties": false,
+ "default": {}
+ }
+ },
+ "additionalProperties": false,
+ "default": {}
+ }
+ },
+ "additionalProperties": false
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+}
diff --git a/tsconfig.json b/tsconfig.json
index 314eab8a..6cc8cddd 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -2,6 +2,14 @@
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
- "baseUrl": "."
+ "baseUrl": ".",
+ "resolveJsonModule": true,
+ // Extending "@tsconfig/docusaurus/tsconfig.json".types with "docusaurus-json-schema-plugin"
+ "types": [
+ "node",
+ "@docusaurus/module-type-aliases",
+ "@docusaurus/theme-classic",
+ "docusaurus-json-schema-plugin"
+ ]
}
}