Skip to content

Latest commit

 

History

History
62 lines (47 loc) · 3.35 KB

File metadata and controls

62 lines (47 loc) · 3.35 KB
title Configuring automatic code review by GitHub Copilot
shortTitle Configure automatic review
allowTitleToDifferFromFilename true
intro Set up {% data variables.product.prodname_copilot_short %} to automatically review pull requests for you, a repository, or an organization.
versions
feature
copilot
redirect_from
/copilot/using-github-copilot/code-review/configuring-automatic-code-review-by-copilot
/copilot/how-tos/agents/copilot-code-review/configuring-automatic-code-review-by-copilot
/copilot/how-tos/agents/copilot-code-review/automatic-code-review
/copilot/how-tos/agents/copilot-code-review/configure-automatic-review
/copilot/how-tos/agents/request-a-code-review/configure-automatic-review
/copilot/how-tos/use-copilot-agents/request-a-code-review/configure-automatic-review
contentType how-tos
category
Configure Copilot

Introduction

You can configure {% data variables.copilot.copilot_code-review_short %} to review pull requests automatically. For an overview of automatic pull request reviews, see AUTOTITLE.

Configuring automatic code review for your own pull requests

Note

This is only available if you are on the {% data variables.copilot.copilot_pro_short %} or {% data variables.copilot.copilot_pro_plus_short %} plan.

{% data reusables.copilot.your-copilot %}

  1. Locate the Automatic {% data variables.copilot.copilot_code-review_short %} option and click the dropdown button.

    Screenshot of the "Automatic {% data variables.copilot.copilot_code-review_short %}" setting with the dropdown menu displayed.

  2. In the dropdown menu, select Enabled.

Configuring automatic code review for a single repository

{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.repo-rulesets-settings %} {% data reusables.repositories.repo-new-ruleset %}

  1. Under "Target branches," click Add target and choose one of the options—for example, Include default branch or Include all branches. {% data reusables.copilot.auto-code-review-steps %}

Configuring automatic code review for repositories in an organization

{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.access-ruleset-settings %} {% data reusables.repositories.repo-new-ruleset %}

  1. Under "Target repositories," click Add target and choose either Include by pattern or Exclude by pattern.

  2. Type a pattern that matches the repository names you want to target—for example, *feature to match all repositories with names ending in feature.

    For pattern-matching syntax, see AUTOTITLE.

  3. Click Add inclusion pattern or Add exclusion pattern.

  4. Repeat for any additional patterns.

    [!NOTE] You can add multiple targeting criteria to the same ruleset. Exclusion patterns are applied after inclusion patterns. For example, you could include any repositories matching the pattern *cat*, and specifically exclude a repository matching the pattern not-a-cat.

{% data reusables.copilot.auto-code-review-steps %}