| 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 %}, {% data variables.copilot.copilot_pro_plus_short %}, or {% data variables.copilot.copilot_max_short %} plans.
{% 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 %}
Note
Medium review effort is in {% data variables.release-phases.public_preview %} and subject to change.
You can set the default review effort level that {% data variables.copilot.copilot_code-review_short %} uses for automatic reviews in a repository. For an overview of review effort levels, see AUTOTITLE.
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %}
- In the "Code & automation" section of the sidebar, click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}, then Code review.
- Next to "Review effort level," select the effort level for automatic reviews in this repository.
- Low: Standard review (default).
- Medium: Deeper analysis of complex logic, security-sensitive code, and cross-service changes.
Medium reviews use more {% data variables.product.prodname_actions %} minutes and {% data variables.product.prodname_ai_credits_short %}. If you use Medium effort, consider configuring larger or self-hosted runners for better performance. See AUTOTITLE.
