diff --git a/docs/guides/review-instructions.md b/docs/guides/review-instructions.md index 6098fd6d..10554177 100644 --- a/docs/guides/review-instructions.md +++ b/docs/guides/review-instructions.md @@ -47,6 +47,21 @@ reviews: ## Abstract Syntax Tree (AST) based instructions {#ast-based} +CodeRabbit offers review instructions based on Abstract Syntax Tree (AST) +patterns. Under the hood, CodeRabbit uses +[`ast-grep`](https://ast-grep.github.io) to power this feature. `ast-grep` is +written in Rust and uses the tree-sitter parser to generate the AST for popular +languages. `ast-grep` is written and maintained by +[Herrington Darkholme](https://twitter.com/hd_nvim). + +:::tip + +`ast-grep` Playground is quite effective in designing and testing AST rules on +source code snippets. You can access the playground +[here](https://ast-grep.github.io/playground.html). + +::: + :::note The additional context provided by this feature is only available during the diff --git a/docs/introduction.md b/docs/introduction.md index 221a123a..eedcc95b 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1,57 +1,63 @@ --- -id: introduction -title: Introduction +id: Get Started +title: Get Started sidebar_label: Introduction sidebar_position: 1 description: - CodeRabbit is an innovative, AI-powered 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. + CodeRabbit is an AI-powered code reviewer offering real-time, context-aware + 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. + +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. +:::
-**CodeRabbit** is an innovative, AI-powered 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. -Additionally, it brings a different perspective to the reviews and finds issues -often missed by the human eye. Developers can chat with the bot within the code, -which allows them to provide additional context, ask questions, or have the bot -generate code. It learns from your suggestions and gets better over time. - -**CodeRabbit** seamlessly integrates with GitHub and GitLab repositories, -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. - -**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](/img/about/coderabbit-flow.png) - -## 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 (Linear, 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 -organization, and used only to improve your organization reviews. Data storage -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. +## Integration with GitHub and GitLab + +>**CodeRabbit** integrates with both GitHub and GitLab 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 GitHub/GitLab webhooks, 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. + +![CodeRabbit Code Review Flow showing how AI integrates with GitHub and GitLab for continuous pull request feedback.](/img/about/coderabbit-flow.png "CodeRabbit Code Review Flow") + +## 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. + +- **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. +- **Compliance**: All data is kept confidential, isolated by organization, and complies with **SOC2 Type II** and **GDPR** standards. + +### Opting Out + +You can opt out of data storage at any time without affecting your access to **CodeRabbit**. +:::warning +However, opting out may reduce the level of personalized review feedback. +::: + +## Try CodeRabbit Now + +>Ready to experience **CodeRabbit** in action? + +:::tip +For open source projects CodeRabbit Pro is **_FREE_**, forever. +- No credit card required +- Unlimited public repositories +::: + +
+ Start reviewing PR Now +
+ + diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 17c94e13..52b846b0 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -53,6 +53,23 @@ const config: Config = { // blogPostComponent: "@theme/BlogPostPage", // }, //], + [ + "./plugins/blog-plugin", + { + id: "blog", + routeBasePath: "blog", + path: "./blog", + blogTitle: "CodeRabbit Blog", + blogDescription: "Blog", + tagsBasePath: "/tags", + editLocalizedFiles: false, + showReadingTime: true, + blogSidebarCount: "ALL", + blogSidebarTitle: "All our posts", + blogListComponent: "@theme/BlogListPage", + blogPostComponent: "@theme/BlogPostPage", + }, + ], [ "@docusaurus/plugin-client-redirects", { @@ -97,6 +114,11 @@ const config: Config = { from: "/platforms/self-hosted-github", to: "/platforms/github-enterprise-server", }, + { + from: "/platforms/saas-azure-devops", + to: "/platforms/azure-devops", + }, + ], }, ], @@ -147,6 +169,10 @@ const config: Config = { "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", diff --git a/src/css/custom.css b/src/css/custom.css index b107d637..767d9410 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -99,3 +99,64 @@ a[docid="docs"] > svg { width: 100%; height: 100%; } + +.navbar .navbar__item { + align-items: center; + display: flex; + font-size: 1.25rem; + font-weight: 700; +} + +a[docid="docs"] > svg { + display: none; +} + +/* Adjustments for mobile view */ +@media (max-width: 768px) { + /* Reduce the logo size for smaller screens */ + .navbar__logo img { + height: 32px; + align-items: center; + } + + /* Reduce the padding around the logo for smaller screens */ + .navbar__logo { + padding: 2px; /* Adjust the padding for smaller screens */ + } +} + +/* Center the Discord link within its parent */ +.navbar__items.navbar__items--right { + display: flex; + justify-content: center; + align-items: center; +} + +@media screen and (max-width: 480px) { + a.navbar__item.navbar__link[docid="docs"] { + display: none !important; + } +} + +@media screen and (max-width: 480px) { + a.navbar__item.navbar__link[href="https://blog.coderabbit.ai/blog"] + { + display: none; + } +} + +/* Light mode Discord icon */ +/* .header-discord-link:before { + -webkit-filter: invert(100%); + filter: invert(100%); + content: ""; + display: flex; + height: 16px; + width: 20px; +} */ + +/* Dark mode Discord icon */ +/* .header-discord-link:before { + background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='16' width='20' viewBox='0 0 640 512'%3E%3Cpath fill='%23FFFFFF' d='M524.5 69.8a1.5 1.5 0 0 0 -.8-.7A485.1 485.1 0 0 0 404.1 32a1.8 1.8 0 0 0 -1.9 .9 337.5 337.5 0 0 0 -14.9 30.6 447.8 447.8 0 0 0 -134.4 0 309.5 309.5 0 0 0 -15.1-30.6 1.9 1.9 0 0 0 -1.9-.9A483.7 483.7 0 0 0 116.1 69.1a1.7 1.7 0 0 0 -.8 .7C39.1 183.7 18.2 294.7 28.4 404.4a2 2 0 0 0 .8 1.4A487.7 487.7 0 0 0 176 479.9a1.9 1.9 0 0 0 2.1-.7A348.2 348.2 0 0 0 208.1 430.4a1.9 1.9 0 0 0 -1-2.6 321.2 321.2 0 0 1 -45.9-21.9 1.9 1.9 0 0 1 -.2-3.1c3.1-2.3 6.2-4.7 9.1-7.1a1.8 1.8 0 0 1 1.9-.3c96.2 43.9 200.4 43.9 295.5 0a1.8 1.8 0 0 1 1.9 .2c2.9 2.4 6 4.9 9.1 7.2a1.9 1.9 0 0 1 -.2 3.1 301.4 301.4 0 0 1 -45.9 21.8 1.9 1.9 0 0 0 -1 2.6 391.1 391.1 0 0 0 30 48.8 1.9 1.9 0 0 0 2.1 .7A486 486 0 0 0 610.7 405.7a1.9 1.9 0 0 0 .8-1.4C623.7 277.6 590.9 167.5 524.5 69.8zM222.5 337.6c-29 0-52.8-26.6-52.8-59.2S193.1 219.1 222.5 219.1c29.7 0 53.3 26.8 52.8 59.2C275.3 311 251.9 337.6 222.5 337.6zm195.4 0c-29 0-52.8-26.6-52.8-59.2S388.4 219.1 417.9 219.1c29.7 0 53.3 26.8 52.8 59.2C470.7 311 447.5 337.6 417.9 337.6z'/%3E%3C/svg%3E") + no-repeat; +} */ diff --git a/static/schema/schema.v2.json b/static/schema/schema.v2.json index 229d2b94..784bd09b 100644 --- a/static/schema/schema.v2.json +++ b/static/schema/schema.v2.json @@ -774,6 +774,19 @@ "additionalProperties": false, "default": {} }, + "pull_requests": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "enum": ["local", "global", "auto"], + "default": "auto", + "description": "Pull Requests | Specify the scope of pull requests to use for the knowledge base. 'local' uses the repository's pull requests, 'global' uses the organization's pull requests, and 'auto' uses repository's pull requests for public repositories and organization's pull requests for private repositories." + } + }, + "additionalProperties": false, + "default": {} + }, "pull_requests": { "type": "object", "properties": {