# AI code reviewer

Bitrise now helps you unblock your teams by providing helpful information and suggestions for every pull request via an AI code reviewer.

The AI code reviewer creates a comment every time a new pull request is opened on GitHub, and every time a user adds a new commit to the pull request.

The code reviewer can provide the following features:

- A summary: Highlights key code changes and their potential impact.
- Walkthrough: Generates context-aware documentation to help team members quickly understand code changes.
- Code review: Detects potential issues, suggests improvements, and enhances code quality.

When you enable the code review, you can select which of the above features you want to use.

## How the code reviewer works

To use the AI code reviewer, you must have a GitHub repository with one of the following connection types:

- [GitHub app integration](/bitrise-platform/repository-access/github-app-integration) with the **write** permission enabled. The comments will be posted by the Bitrise GitHub app. We strongly recommend using this method.
- [GitHub OAuth connection](/bitrise-platform/repository-access/repository-access-with-oauth). The comments will be posted in the name of the [service credential user](/bitrise-platform/integrations/the-service-credential-user).

  :::tip[Bot user]

  If you use the OAuth connection, we recommend creating a bot user for this purpose and connect it as the service credential user on Bitrise. This makes it clear that the comments on the pull request come from a bot, not from an actual team member.

  :::

:::important[HTTPS connection]

The AI code reviewer doesn't work with an HTTPS connection. We recommend switching to the GitHub app.

:::

The AI code reviewer runs a Bitrise build that shows up in your list of Bitrise CI builds. This build:

- Doesn't count towards any of your resource limits (credits, build count, build minutes).
- Doesn't count towards concurrency limits.
- Increases the actual [build number](/bitrise-ci/run-and-analyze-builds/build-numbering-and-app-versioning).
- Is included in [Insights](/insights) data.

For each new commit on a pull request, the code reviewer starts a new review and a new build.

There is a limit of 10 reviews per PR. There is no limit on how many new PRs you can have reviewed.

:::important[Third-party API vendor]

Bitrise AI uses a third-party API vendor for this feature so data will leave Bitrise in order to generate the PR reviews. See our [AI FAQ](/bitrise-platform/ai/ai-faq---how-bitrise-leverages-ai-technologies-in-its-features-and-services) for more information on how Bitrise leverages AI.

:::

To configure the code reviewer:

1. Enable AI features for your workspace: [Enabling AI features on Bitrise](/bitrise-platform/ai/enabling-ai-features-on-bitrise).
1. Enable the AI code reviewer for specific projects: [Enabling the AI code reviewer](/bitrise-platform/integrations/ai-code-reviewer#enabling-the-ai-code-reviewer).

## Enabling the AI code reviewer

To enable the AI code reviewer for a project:

1. 1. Open your project on Bitrise with a user that has the **Admin** [role on the project](/bitrise-platform/projects/roles-and-permissions-for-bitrise-ci), or a [custom role](/bitrise-platform/workspaces/collaboration-and-permissions-in-workspaces/custom-roles/custom-roles-overview) with the **Edit workflows** permission.
1. On the main page of the project, click on the **Project settings** button.
1. On the left, select **Bitrise AI**.
1. Toggle **Code reviewer** on.
1. In the dialog, select the features you want to enable:

   - **Summary**
   - **Walkthrough**
   - **Code review**

   You must enable at least one of them.
1. Click **Save changes**.
