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

# Set up and configuration

> Configure Code Review settings for your team

## Setting up Code Review

To set up Code Review for your Unblocked team, select Code Review from the left sidebar. Next, click **Set Up Code Review**. If you haven't connected your issue tracker, you'll be prompted to do so.

<img src="https://mintcdn.com/unblocked/trQ73RqAUsC5B6mX/img/review/cr-enable.png?fit=max&auto=format&n=trQ73RqAUsC5B6mX&q=85&s=5e6e6cc708656977b3b96fd49584aa6d" alt="Enable Code Review" width="2880" height="1844" data-path="img/review/cr-enable.png" />

## Configure Code Review

Once Code Review is enabled, you can adjust the settings to control how reviews are conducted. Click **Settings** in the sidebar, then select **Code Review**.

### Select repositories

Unblocked will automatically review pull requests only for repositories you select.

<img src="https://mintcdn.com/unblocked/Tvtxr5Fdi03Cq5eo/img/review/cr-repos.png?fit=max&auto=format&n=Tvtxr5Fdi03Cq5eo&q=85&s=27fc9ab63d5b88888a041f14d01f37bc" alt="Select Repositories" width="2880" height="1800" data-path="img/review/cr-repos.png" />

### Code Review user access

Use the **Code Review User Access** setting to control which users are eligible to receive automated code reviews.
By default, **All Users** is selected, so Unblocked will review pull requests for everyone in your workspace.
To limit reviews to specific people, choose **Specific Users** and select the users you want from the list.
Only pull requests authored by those users will receive automated code reviews.

Users who are not selected can still request a review manually by mentioning `@unblocked` in a PR comment. See [Requesting a review](/code-review/how-it-works#requesting-a-review-or-summary-with-%40unblocked) for details.

<img src="https://mintcdn.com/unblocked/Tvtxr5Fdi03Cq5eo/img/review/cr-user-access.png?fit=max&auto=format&n=Tvtxr5Fdi03Cq5eo&q=85&s=c75ece192ab6bac1286bbd7d9dc57c33" alt="User Access" width="2880" height="1800" data-path="img/review/cr-user-access.png" />

### Automated approval

Use this setting to control what happens when Unblocked reviews a pull request and finds no issues. The options are:

* **Auto-approve** (default) — automatically approve the pull request
* **Comment** — leave a comment saying "No issues found"
* **Silent** — take no action

<Note>
  On GitHub, auto-approvals do NOT count toward required approvals under your branch protection rules, because Unblocked isn't a member of your organization.
  Treat the AI approval as a pass signal, and keep human reviewers for final sign-off.
</Note>

<img src="https://mintcdn.com/unblocked/FCIOZjP84beO9np_/img/review/cr-approved.png?fit=max&auto=format&n=FCIOZjP84beO9np_&q=85&s=57098713573aa5071496203ee2560fcc" alt="Automated Approval" width="1986" height="856" data-path="img/review/cr-approved.png" />

### Custom Rules

You can customize how Unblocked reviews code by providing instructions at two levels:

* **Repository instructions** — When enabled, Unblocked follows repository-specific instructions from the `AGENTS.md` file in the root of each repository.
* **Global instructions** — Add instructions that apply to every repository in your workspace by entering up to 10 KB of plain text in the **Global instructions** field. Use this for organization-wide standards.

Both levels work together: global instructions set the baseline, and repository instructions add more targeted guidance.
For best results, keep instructions clear, concise, and actionable.
The [agents.md](https://agents.md) specification is a good reference for writing effective instructions.

### Excluded paths

You can configure custom path exclusion patterns to exclude specific files or directories from review.
These patterns use glob syntax and are applied when processing pull requests.

Common exclusion patterns include `*.md` to exclude all Markdown files at any depth, `src/test/**` to exclude all files under a specific directory from the repository root, and `package-lock.json` to exclude specific files. You can also exclude entire directories like `node_modules/**` or file types like `*.generated.js`.

<img src="https://mintcdn.com/unblocked/Tvtxr5Fdi03Cq5eo/img/review/cr-excluded-paths.png?fit=max&auto=format&n=Tvtxr5Fdi03Cq5eo&q=85&s=1f53c3632d02845edd30a2e8981a355c" alt="Exclusion Patterns" width="2880" height="1800" data-path="img/review/cr-excluded-paths.png" />

### Select a bot account

<Note>
  This section is only required for Bitbucket Cloud, Bitbucket Data Center, GitLab Cloud, and GitLab Self-Managed repositories.
</Note>

<Tabs>
  <Tab title="Bitbucket Cloud">
    For Bitbucket Cloud repositories, code review comments need to be posted on behalf of a Bitbucket user account. We recommend creating an Unblocked bot account for this specific purpose.

    <Steps>
      <Step title="Create a bot account">
        <Note>
          <b>Already have a bot account?</b>
          <p>Some teams already have a bot account they use for posting automated messages. If you already have a bot account that you can repurpose for posting code review comments, skip to the next step to select it.</p>
        </Note>

        * [Create a new account](https://id.atlassian.com/signup?application=bitbucket\&continue=https%3A%2F%2Fbitbucket.org\&prompt=select_account) in Bitbucket with the following information:
          * **Name:** Unblocked
          * **Avatar:** download and use the Unblocked logo below

                    <img src="https://mintcdn.com/unblocked/soZi90zJ9_abJhu-/img/Unblocked-logo-with-bg.png?fit=max&auto=format&n=soZi90zJ9_abJhu-&q=85&s=4254a1a1add3321511dfe55c842cf890" alt="Unblocked logo" width="160" noZoom data-path="img/Unblocked-logo-with-bg.png" />

                    <a href="/img/Unblocked-logo-with-bg.png" download="Unblocked-logo.png">
                      Download PNG
                    </a>

        * [Switch accounts](https://id.atlassian.com/login/select-account?application=bitbucket\&continue=https%3A%2F%2Fbitbucket.org) and sign in to your Bitbucket Workspace as a Workspace admin.

        * Click the gear icon in the top right of the navigation bar, and select **User Management**.

        * Invite your new bot user to your workspace.

        * Accept the email invitation that was sent to your bot account.
      </Step>

      <Step title="Select your Bot Account">
        In Unblocked, search for the bot account you just created and select it. You may be required to authorize this account with Unblocked.

        <Warning>
          In order to successfully authorize your bot account, you need to be logged in with that account in Bitbucket Cloud.
        </Warning>

        <img src="https://mintcdn.com/unblocked/Tvtxr5Fdi03Cq5eo/img/review/cr-select-bot.png?fit=max&auto=format&n=Tvtxr5Fdi03Cq5eo&q=85&s=ecd4221a0ec67aa1af56c581dad728a2" alt="Select Bot" width="1608" height="476" data-path="img/review/cr-select-bot.png" />
      </Step>
    </Steps>
  </Tab>

  <Tab title="Bitbucket Data Center">
    For Bitbucket Data Center repositories, code review comments need to be posted on behalf of a Bitbucket Data Center user account. We recommend creating an Unblocked bot account for this specific purpose.

    <Steps>
      <Step title="Create a bot account">
        <Note>
          <b>Already have a bot account?</b>
          <p>Some teams already have a bot account they use for posting automated messages. If you already have a bot account that you can repurpose for posting code review comments, skip to the next step to select it.</p>
        </Note>

        * **Sign in** as an administrator in your Bitbucket Data Center instance.

        * In the top navigation bar, click the admin icon.

        * Under **Accounts**, select **Users**, then **Create user**.

        * Create a new user account in Bitbucket Data Center with the following information:
          * **Name:** Unblocked
          * **Avatar:** download and use the Unblocked logo below

                    <img src="https://mintcdn.com/unblocked/soZi90zJ9_abJhu-/img/Unblocked-logo-with-bg.png?fit=max&auto=format&n=soZi90zJ9_abJhu-&q=85&s=4254a1a1add3321511dfe55c842cf890" alt="Unblocked logo" width="160" noZoom data-path="img/Unblocked-logo-with-bg.png" />

                    <a href="/img/Unblocked-logo-with-bg.png" download="Unblocked-logo.png">
                      Download PNG
                    </a>

        * Before the bot can access a project, it must be able to sign in to Bitbucket Data Center.
          * Go to **Administration** > **Users**.
          * Find your bot user and ensure it is assigned to a group.
          * Go to **Administration** > **Global Permissions**.
          * Ensure that group has the **Bitbucket User** permission.

        * For each project Unblocked should review, navigate to **Project settings** > **Permissions**.
          * Add the bot user and set the permission as "**Developer**" or above.
      </Step>

      <Step title="Select your Bot Account">
        In Unblocked, search for the bot account you just created and select it. You may be required to authorize this account with Unblocked.

        <Warning>
          In order to successfully authorize your bot account, you need to be logged in with that account in Bitbucket Data Center.
        </Warning>

        <img src="https://mintcdn.com/unblocked/Tvtxr5Fdi03Cq5eo/img/review/cr-select-bot.png?fit=max&auto=format&n=Tvtxr5Fdi03Cq5eo&q=85&s=ecd4221a0ec67aa1af56c581dad728a2" alt="Select Bot" width="1608" height="476" data-path="img/review/cr-select-bot.png" />
      </Step>
    </Steps>
  </Tab>

  <Tab title="GitLab Cloud">
    For GitLab Cloud repositories, code review comments need to be posted on behalf of a GitLab user account. We recommend creating an Unblocked bot account for this specific purpose.

    <Steps>
      <Step title="Create a bot account">
        <Note>
          <b>Already have a bot account?</b>
          <p>Some teams already have a bot account they use for posting automated messages. If you already have a bot account that you can repurpose for posting code review comments, skip to the next step to select it.</p>
        </Note>

        * [Create a new account](https://gitlab.com/users/sign_up) in GitLab.

        * In GitLab, click on your avatar in the top right, and click **Edit Profile**.

        * Change the following information:
          * **Name:** Unblocked
          * **Avatar:** download and use the Unblocked logo below

                    <img src="https://mintcdn.com/unblocked/soZi90zJ9_abJhu-/img/Unblocked-logo-with-bg.png?fit=max&auto=format&n=soZi90zJ9_abJhu-&q=85&s=4254a1a1add3321511dfe55c842cf890" alt="Unblocked logo" width="160" noZoom data-path="img/Unblocked-logo-with-bg.png" />

                    <a href="/img/Unblocked-logo-with-bg.png" download="Unblocked-logo.png">
                      Download PNG
                    </a>

        * **Sign out** of your GitLab bot account.

        * **Sign in** as a Group admin for your GitLab Group and navigate to it.

        * Click **Manage** in the left navigation and select **Members**.

        * Click **Invite members**

        * Set the role as "**Planner**" or above and click "**Invite**".
      </Step>

      <Step title="Select your Bot Account">
        In Unblocked, search for the bot account you just created and select it. You may be required to authorize this account with Unblocked.

        <Warning>
          In order to successfully authorize your bot account, you need to be logged in with that account in GitLab.
        </Warning>

        <img src="https://mintcdn.com/unblocked/Tvtxr5Fdi03Cq5eo/img/review/cr-select-bot.png?fit=max&auto=format&n=Tvtxr5Fdi03Cq5eo&q=85&s=ecd4221a0ec67aa1af56c581dad728a2" alt="Select Bot" width="1608" height="476" data-path="img/review/cr-select-bot.png" />
      </Step>
    </Steps>
  </Tab>

  <Tab title="GitLab Self-Managed">
    For GitLab Self-Managed repositories, code review comments need to be posted on behalf of a GitLab Self-Managed user account. We recommend creating an Unblocked bot account for this specific purpose.

    <Steps>
      <Step title="Create a bot account">
        <Note>
          <b>Already have a bot account?</b>
          <p>Some teams already have a bot account they use for posting automated messages. If you already have a bot account that you can repurpose for posting code review comments, skip to the next step to select it.</p>
        </Note>

        * Create a new account in GitLab Self-Managed with the following information:
          * **Name:** Unblocked
          * **Avatar:** download and use the Unblocked logo below

                    <img src="https://mintcdn.com/unblocked/soZi90zJ9_abJhu-/img/Unblocked-logo-with-bg.png?fit=max&auto=format&n=soZi90zJ9_abJhu-&q=85&s=4254a1a1add3321511dfe55c842cf890" alt="Unblocked logo" width="160" noZoom data-path="img/Unblocked-logo-with-bg.png" />

                    <a href="/img/Unblocked-logo-with-bg.png" download="Unblocked-logo.png">
                      Download PNG
                    </a>

        * **Sign out** of your GitLab Self-Managed bot account.

        * **Sign in** as a Group admin for your GitLab Group and navigate to it.

        * Click **Manage** in the left navigation and select **Members**.

        * Click **Invite members**

        * Set the role as "**Developer**" or above and click "**Invite**".
      </Step>

      <Step title="Select your Bot Account">
        In Unblocked, search for the bot account you just created and select it. You may be required to authorize this account with Unblocked.

        <Warning>
          In order to successfully authorize your bot account, you need to be logged in with that account in GitLab Self-Managed.
        </Warning>

        <img src="https://mintcdn.com/unblocked/Tvtxr5Fdi03Cq5eo/img/review/cr-select-bot.png?fit=max&auto=format&n=Tvtxr5Fdi03Cq5eo&q=85&s=ecd4221a0ec67aa1af56c581dad728a2" alt="Select Bot" width="1608" height="476" data-path="img/review/cr-select-bot.png" />
      </Step>
    </Steps>
  </Tab>
</Tabs>
