> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> Learn how to integrate CodeRabbit with GitHub.com repositories for automated AI-powered code reviews, including setup, permissions, and repository configuration.

> [!NOTE]
>
> For an overview of how CodeRabbit integrates with Git platforms, see [Add CodeRabbit to your repository](https://docs.coderabbit.ai/platforms).
>
> For a hands-on tutorial with CodeRabbit performing code reviews on a live GitHub repository that you create, see [Quickstart](https://docs.coderabbit.ai/getting-started/quickstart.md).
>
> GitHub Enterprise Cloud users on `*.ghe.com` should use the [Self-Hosted GitHub guide](https://docs.coderabbit.ai/platforms/github-enterprise-server.md).

## Prerequisites

> [!WARNING]
>
> **Required permissions**
>
> You need to have a GitHub account with **owner-level permissions** for at least one repository associated with that account.
>
> If you want to authorize CodeRabbit for repositories in a GitHub organization, you need **organization owner permissions** as well.

## Authorize CodeRabbit with your GitHub account

**1. Visit CodeRabbit login page**

Navigate to [the CodeRabbit login page](https://app.coderabbit.ai/login).

**2. Initiate GitHub login**

Click **Login with GitHub**. Your browser will redirect to GitHub.com.

**3. Sign in to GitHub (if required)**

If GitHub prompts you to sign in, enter your GitHub login credentials as you normally would.

**4. Review and authorize permissions**

GitHub displays a summary of the information that CodeRabbit needs to integrate with your account. This includes read-only access to:

* Organizations and teams associated with your GitHub account
* Email addresses associated with your GitHub account

Click **Authorize coderabbitai** to grant these permissions.

**5. Select an organization**

Choose the organization where you want to install CodeRabbit.

* If you belong to multiple organizations, select from the list
* For personal repositories, select your account name

> [!TIP]
>
> If your organization doesn't appear in the list, add it from the organization switcher. If you select an organization with no repositories connected yet, CodeRabbit guides you through **Grant GitHub bot access** and **Select repositories**. See [Adding organizations](https://docs.coderabbit.ai/management/adding-organizations.md) for details.

**6. Install and authorize CodeRabbit**

Configure repository access and review the permissions CodeRabbit needs.

### Choose repository access

Select which repositories CodeRabbit can access:

**All repositories**: Grants access to all current and future repositories owned by this organization, including public repositories.

**Only select repositories**: Limits access to specific repositories you choose from the list.

> [!TIP]
>
> You can change this setting later if needed.

### Review permissions

CodeRabbit requires the following permissions to perform code reviews and manage pull requests:

**Read-only access:**

* Actions, discussions, members, and metadata
* [Merge queues](https://docs.github.com/en/webhooks/webhook-events-and-payloads#merge_group)

**Read-and-write access:**

* [Checks](https://docs.github.com/en/rest/checks/runs#create-a-check-run), code, commit statuses, issues, and pull requests
* [Workflows](https://docs.github.com/en/rest/actions/workflows)

Read-and-write access to checks lets CodeRabbit publish the [`CodeRabbit` check run](https://docs.coderabbit.ai/pr-reviews/status-check) that reports the status of each review on your pull requests, publish the [CodeRabbit Security check](https://docs.coderabbit.ai/security/pull-request-check.md) and the merge queue check described below, and read your CI results for the [GitHub Checks](https://docs.coderabbit.ai/tools/github-checks.md) integration. Read-and-write access to commit statuses lets CodeRabbit post the `CodeRabbit` review status as a commit status instead when `reviews.review_progress` is `false`, or when it cannot create or complete the check run.

Read-and-write access to workflows lets CodeRabbit's agents create or update files under `.github/workflows/`, which happens when you ask an agent to fix a failing CI job or to generate a workflow. GitHub treats workflow files as a separate permission boundary: an app with write access to code still cannot change them, and the whole push is rejected rather than partially applied. Reviewing does not modify workflow files, so a CodeRabbit installation used only for reviews never exercises this permission.

Read-only access to merge queues lets CodeRabbit receive GitHub's `merge_group` webhook. When a pull request enters a merge queue, GitHub creates a synthetic merge-group commit, and the `CodeRabbit` check from the original pull request does not carry over to it. CodeRabbit publishes a successful `CodeRabbit` check for that commit so the merge queue is not blocked. This does not rerun the review.

> [!NOTE]
>
> CodeRabbit requests read and write access to your repository for its code review, issue management, and pull request generation features to work. CodeRabbit does not retain your source code after review, except when [review caching](https://docs.coderabbit.ai/reference/caching.md) is enabled to speed up future reviews. For more information, see [the CodeRabbit Trust Center](https://trust.coderabbit.ai).

### Complete installation

Click **Install & Authorize** (for new integrations) or **Save** (for existing integrations).

**7. Trigger your first review (optional)**

After installation, you can immediately see CodeRabbit in action or skip to configure settings first.

**Option 1: Trigger a review**

1. Select a repository from your list
2. Choose an existing pull request
3. CodeRabbit will perform a code review on that pull request

**Option 2: Skip to dashboard**

Click **Skip to App** to access the CodeRabbit dashboard and configure settings before your first review.

## Troubleshooting

> [accordion] Organization is blocked by a GitHub IP allow list
>
> When you switch to a GitHub organization that is blocked by its IP allow list, CodeRabbit keeps you in your previous organization. The error identifies the blocked organization and its GitHub IP allow list.
>
> Access can be blocked for one or both of these reasons: one or more CodeRabbit egress IP addresses are missing from the organization's allow list, or CodeRabbit is experiencing a connectivity or routing problem. Verify that all documented CodeRabbit egress IP addresses are allowed.
>
> **IP allow list configuration:**
>
> 1. Ask a GitHub organization owner to open the organization's IP allow list settings.
> 2. Add CodeRabbit's outbound IP addresses:
>
> ```text IPs to allow list theme={null}
> 35.222.179.152/32, 34.170.211.100/32, 136.113.208.247/32
> ```
>
> 3. Save the policy changes, then switch to the organization again in CodeRabbit.
>
> If CodeRabbit detects intermittent access, it sends an action-required email with the subject **"CodeRabbit is intermittently unable to access your GitHub organization"** and the action **"Review IP allowlist"**. Once access is consistently restored, CodeRabbit automatically sends a recovery email with the subject **"CodeRabbit can access your GitHub organization again"**. This email confirms that no further action is required.
>
> > [!WARNING]
> >
> > If the organization remains blocked after updating its IP allow list, [contact our support team](https://docs.coderabbit.ai/support).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.