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

> ## Agent Instructions
> IronBee (ironbee.ai) is an AI QA engineer: it verifies code changes against the running app and keeps the evidence. It is not related to the IronBee open-source web application firewall.
> The console is at https://console.ironbee.ai.
> Install the CLI with `npm install -g @ironbee-ai/cli`, sign in with `ironbee login`, and set up a project with `ironbee install`.
> In GitHub workflows, use the action as `ironbee-ai/ironbee-action@v1` and pass the `IRONBEE_API_KEY` secret as the `ironbee_api_key` input.
> In GitLab pipelines, include the component `gitlab.com/ironbee-ai/ironbee-gitlab/verify@v1`; it reads the `IRONBEE_API_KEY` CI/CD variable by default.
> In Bitbucket Pipelines, run the pipe `docker://ghcr.io/ironbee-ai/ironbee-bitbucket:v1` and pass `IRONBEE_API_KEY: $IRONBEE_API_KEY` and `BITBUCKET_OAUTH_TOKEN: $BITBUCKET_OAUTH_TOKEN` under its `variables:`.
> Console scenarios (https://docs.ironbee.ai/console/scenarios) and CLI saved scenarios (https://docs.ironbee.ai/cli/guides/scenarios) are separate features.
> For plans and prices, link to https://ironbee.ai/pricing; the website is the source of truth for them.

# Code review of pull requests

> IronBee reviews pull requests on GitHub and Bitbucket and merge requests on GitLab, comments on what it finds, and keeps each review in the console.

IronBee reviews the pull requests of every GitHub repository the IronBee GitHub App covers, the merge requests of every GitLab repository you pick in a connected group, and the pull requests of every Bitbucket repository you pick in a connected workspace. Each review reads the change against the rest of the repository and reports what it finds:

* **On GitHub:** a review with an inline comment for each finding, a summary added to the pull request description, and the **IronBee review** check. See [On the pull request](https://docs.ironbee.ai/code-review/on-github.md).
* **On GitLab:** a review note with an inline thread for each finding, a summary note, and the **IronBee review** pipeline status. See [On the merge request](https://docs.ironbee.ai/code-review/on-gitlab.md).
* **On Bitbucket:** an inline comment for each finding, a review comment, a summary comment, and the **IronBee review** build status. See [On Bitbucket](https://docs.ironbee.ai/code-review/on-bitbucket.md).
* **In the console:** every pull request with its reviews and findings, under **Code review** in the sidebar and on each project's **Code review** tab.

To review a branch before you open a pull request, run `ironbee review` from the CLI. See [Code review of your local checkout](https://docs.ironbee.ai/cli/guides/code-review.md).

The same connection also gives each repository a [code wiki](#code-wiki), on the project's **Code wiki** tab next to **Code review**.

***

## Turn it on

Install the [IronBee GitHub App](https://docs.ironbee.ai/integrations/github.md) on your repositories, or connect a [GitLab group](https://docs.ironbee.ai/integrations/gitlab.md) or a [Bitbucket workspace](https://docs.ironbee.ai/integrations/bitbucket.md) and pick its repositories. Every repository the App covers, and every GitLab or Bitbucket repository you pick, becomes a project, and code review is on for it from the start: the account setting **Review new repositories automatically** is **On** by default. The repository's [code wiki](https://docs.ironbee.ai/console/code-wiki.md) starts at the same time, unless **Write a wiki for newly connected repositories** is off in [Code wiki settings](https://docs.ironbee.ai/console/code-wiki-settings.md).

To stop reviewing one repository, an owner or admin opens the project's **Settings > Code review** and turns off **Review pull requests in this repository**. See [Code review settings](https://docs.ironbee.ai/code-review/settings.md).

![The Code review page of a project's settings, with the Review pull requests in this repository switch turned on and how many settings follow the account](https://mintcdn.com/ironbee/yXiHzqPAo_3Hu63x/images/console/code-review/project-settings-code-review-light.png?fit=max\&auto=format\&n=yXiHzqPAo_3Hu63x\&q=85\&s=37066c325f1dc2f8bf49df958aabadb2)

![The Code review page of a project's settings, with the Review pull requests in this repository switch turned on and how many settings follow the account](https://mintcdn.com/ironbee/yXiHzqPAo_3Hu63x/images/console/code-review/project-settings-code-review-dark.png?fit=max\&auto=format\&n=yXiHzqPAo_3Hu63x\&q=85\&s=521e7311e4df7a306517179b1284ea1a)

***

## What starts a review

* **A pull request opens, or gets a new push.** **Automatic reviews** decides which of these start a review: **On open and every push** (the default), **On open only**, or **Only when asked**. By default, a draft waits until it's ready for review, and a pull request opened by a bot isn't reviewed.
* **You ask for one.** Comment `@ironbee-ai review` on the pull request or merge request, on GitHub, GitLab or Bitbucket. On GitLab, the group's IronBee account, `@ironbee-<group path> review`, works too. You can also click **Review now** on its page in the console, or **Review** on a pull request that [needs review](https://docs.ironbee.ai/code-review/pull-requests.md).

A follow-up review reads only what changed since the last one, and answers the threads it opened before. See [Code review on GitHub](https://docs.ironbee.ai/code-review/on-github.md), [Code review on GitLab](https://docs.ironbee.ai/code-review/on-gitlab.md) and [Code review on Bitbucket](https://docs.ironbee.ai/code-review/on-bitbucket.md).

***

## What a review looks at

| Setting | What it decides |
| - | - |
| **Review depth** | **Auto** (the default) picks the depth by the size of the change. **Quick**, **Standard** and **Deep** fix it |
| **Focus areas** | **Bugs and logic** is always on. **Security** and **Docs, names and tests** are on by default |
| **Extra checks** | Optional passes, all off by default, such as **Linter rules** or **Missing tests** |
| **Rules and memories from the repository** | Whether the review reads the rules and memories kept in the repository, on by default |

[Rules and memories](https://docs.ironbee.ai/code-review/rules-and-memories.md) tell the review what your team expects. A rule says what must or must not happen and can raise a finding. A memory says what is true in a part of the code and never raises one on its own.

Every finding has a severity, **Critical**, **High**, **Medium** or **Low**, and a category: correctness, security, or docs, names and tests.

***

## Code wiki

IronBee writes a [code wiki](https://docs.ironbee.ai/console/code-wiki.md) of each repository the GitHub App covers or you pick in a GitLab group or a Bitbucket workspace, from its default branch: what the code does, where to start, how its parts depend on each other, and one page for each area, with every claim linked to the lines it comes from. It's written again as pull requests merge, and it uses no credits.

The wiki starts when the repository is connected, like code review, and you read it on the project's **Code wiki** tab. To choose which repositories get one and in which language, see [Code wiki settings](https://docs.ironbee.ai/console/code-wiki-settings.md).

***

## Credits

Each review uses credits by the reviewable lines it reads and the depth it runs at. A review cancelled after it starts uses half; one that fails or has nothing new to read uses none. Answers to questions, replies, harvests after a merge, rechecks, retractions and the code wiki use none. When the team's credits run out, or what's left doesn't cover the review, the **IronBee review** check or status says so instead of reviewing. On a GitLab project with **Pipelines must succeed** and **Block merges** off, where IronBee writes no status, a reply on the merge request says so. The rates are under **What a job costs** on [Credit usage](https://docs.ironbee.ai/console/usage.md#what-a-job-costs); each plan's credits are on [Pricing](https://docs.ironbee.ai/console/pricing.md).

***

## What's next?

> [card] [On the pull request](https://docs.ironbee.ai/code-review/on-github.md)
>
> The review, its comments, the summary, the check and the commands.

> [card] [On the merge request](https://docs.ironbee.ai/code-review/on-gitlab.md)
>
> What differs on GitLab: the summary note, the pipeline status and merges.

> [card] [On Bitbucket](https://docs.ironbee.ai/code-review/on-bitbucket.md)
>
> What differs on Bitbucket: the comments, the build status and merges.

> [card] [Pull requests in the console](https://docs.ironbee.ai/code-review/pull-requests.md)
>
> Every pull request with its reviews and findings.

> [card] [Rules and memories](https://docs.ironbee.ai/code-review/rules-and-memories.md)
>
> Tell the review what your team expects.

> [card] [Settings](https://docs.ironbee.ai/code-review/settings.md)
>
> Triggers, depth, focus, comments and merge blocking.

> [card] [Code wiki](https://docs.ironbee.ai/console/code-wiki.md)
>
> Pages that explain each repository's code, kept current as pull requests merge.

> [card] [Review from the CLI](https://docs.ironbee.ai/cli/guides/code-review.md)
>
> Review a local branch with `ironbee review` before you open a pull request.


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