|
| 1 | +--- |
| 2 | +title: Review pull requests |
| 3 | +description: An overview of CodeRabbit's core code review features. |
| 4 | +sidebar_label: Overview |
| 5 | +--- |
| 6 | + |
| 7 | +The central feature of CodeRabbit is its ability to proactively review |
| 8 | +new pull requests on your code repository. |
| 9 | + |
| 10 | +CodeRabbit reviews take the form of pull request comments that |
| 11 | +include summaries, analyses, and initial critiques of the proposed changes. |
| 12 | +This information, usually added to pull requests within minutes, can help your team perform more rapid, better-informed code reviews. |
| 13 | + |
| 14 | +The following sections present an overview of this feature. For a hands-on example that lets you experience a CodeRabbit code review using |
| 15 | +a real repository, see [Quickstart](/getting-started/quickstart). |
| 16 | + |
| 17 | +## Automatically review pull requests {#review} |
| 18 | + |
| 19 | +After you [integrate CodeRabbit with your repository](/platforms), CodeRabbit proceeds |
| 20 | +to automatically review every subsequent pull request, as soon as each one is created. |
| 21 | + |
| 22 | +CodeRabbit performs code reviews by attaching comments to the pull request. |
| 23 | +These comments contain detailed summaries and analyses of the changes, |
| 24 | +as well as listing out problems or areas for potential improvement that it found. |
| 25 | + |
| 26 | +CodeRabbit uses [a variety of open-source linters and security tools](/tools) and a custom |
| 27 | +code verification agent to provide this analysis. CodeRabbit |
| 28 | +also consults several models to further analyze and critique the proposed changes, |
| 29 | +using all of the content of your repository as context. The code-review comment that CodeRabbit attaches |
| 30 | +to your pull request synthesizes and summarizes all of the information collected from these different sources. |
| 31 | + |
| 32 | +For more information about the graph analysis that CodeRabbit includes with its reviews |
| 33 | +when available, see [CodeRabbit Code Graph Analysis](/integrations/code-graph-analysis). |
| 34 | + |
| 35 | +### Events that trigger automated reviews {#events} |
| 36 | + |
| 37 | +By default, the following activity in your repository triggers CodeRabbit to |
| 38 | +perform a code review: |
| 39 | + |
| 40 | +- If CodeRabbit sees a new pull request, then it immediately performs a full review |
| 41 | + of the proposed code changes. |
| 42 | +- If an open pull request that CodeRabbit has already reviewed gets modified with another |
| 43 | + commit, then CodeRabbit performs an incremental review that focuses on the new commit. |
| 44 | + |
| 45 | +## Interact with CodeRabbit reviews {#interact} |
| 46 | + |
| 47 | +After CodeRabbit attaches its initial code-review comment to a pull request, you can |
| 48 | +directly interact with CodeRabbit by mentioning its username, `@coderabbitai`, in comments |
| 49 | +that you post to the pull request. |
| 50 | + |
| 51 | +These interactions can serve several purposes: |
| 52 | + |
| 53 | +- Free-form discussion about the pull request and the ongoing code review. |
| 54 | +- Commands to have CodeRabbit perform specific actions regarding the code review. |
| 55 | +- Prompts to have CodeRabbit generate its own improvements to the branch under review. |
| 56 | + |
| 57 | +### Chat with CodeRabbit {#chat} |
| 58 | + |
| 59 | +You can have open-ended, natural-language discussion with CodeRabbit during a code review, treating it |
| 60 | +as an LLM-powered chatbot that has your entire code repository available for context. For more information, see [CodeRabbit Chat](/guides/agent_chat). |
| 61 | + |
| 62 | +### Manage CodeRabbit review behavior {#manage} |
| 63 | + |
| 64 | +CodeRabbit recognizes a variety of keyword-based commands that let you control its |
| 65 | +behavior during a code review, including the following: |
| 66 | + |
| 67 | +- Pause or resume automated reviews of the pull request. |
| 68 | +- Manually request a review, when automated reviews are paused. |
| 69 | +- Resolve all open comments authored by CodeRabbit. |
| 70 | + |
| 71 | +For more information, see [Control and manage code reviews](/guides/commands). |
| 72 | + |
| 73 | +### Generate improvements {#generate} |
| 74 | + |
| 75 | +You can command CodeRabbit to generate improvements to the branch under review. |
| 76 | +CodeRabbit accomplishes this by publishing a new branch based on the branch under review, |
| 77 | +and creating a new pull request for your own review. |
| 78 | + |
| 79 | +Available code-generation commands let you request the following from CodeRabbit: |
| 80 | + |
| 81 | +- Implement the suggestions for improvements that CodeRabbit has made in its earlier code review comments. |
| 82 | +- Generate inline documentation for any undocumented functions that this pull request proposes to add. |
| 83 | + |
| 84 | +For more information, see [Generate improvements](/guides/generate-improvements). |
| 85 | + |
| 86 | +## What's next {#whats-next} |
| 87 | + |
| 88 | +- [Control and manage code reviews](/guides/commands) |
| 89 | +- [Generate code improvements](/guides/generate-improvements) |
0 commit comments