| 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 |
|
||||||
| redirect_from |
|
||||||
| contentType | how-tos | ||||||
| category |
|
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.
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 %}
-
Locate the Automatic {% data variables.copilot.copilot_code-review_short %} option and click the dropdown button.
-
In the dropdown menu, select Enabled.
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.repositories.repo-rulesets-settings %} {% data reusables.repositories.repo-new-ruleset %}
- 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 %}
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.access-ruleset-settings %} {% data reusables.repositories.repo-new-ruleset %}
-
Under "Target repositories," click Add target and choose either Include by pattern or Exclude by pattern.
-
Type a pattern that matches the repository names you want to target—for example,
*featureto match all repositories with names ending infeature.For pattern-matching syntax, see AUTOTITLE.
-
Click Add inclusion pattern or Add exclusion pattern.
-
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 patternnot-a-cat.
{% data reusables.copilot.auto-code-review-steps %}
