You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests.md
+6
Original file line number
Diff line number
Diff line change
@@ -169,3 +169,9 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler
169
169
{% data reusables.code-scanning.false-positive-fix-codeql %}
170
170
171
171
For more information about dismissing alerts, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts#dismissing--alerts).
Copy file name to clipboardexpand all lines: content/code-security/trialing-github-advanced-security/explore-trial-code-scanning.md
+5-2
Original file line number
Diff line number
Diff line change
@@ -83,9 +83,12 @@ This allows you to update the configuration in a single location, but use the wo
83
83
84
84
### {% data variables.product.prodname_copilot_short %} review
85
85
86
-
{% data reusables.copilot.code-review.preview-note %}
86
+
> [!NOTE]
87
+
>
88
+
> {% data reusables.copilot.code-review.preview-note %}
89
+
> * If you get a {% data variables.product.prodname_copilot_short %} subscription from an organization, you will only be able to participate in the {% data variables.release-phases.public_preview %} on the {% data variables.product.github %} website if an owner of your organization {% ifversion ghec %}or enterprise{% endif %} has enabled **Copilot in GitHub.com > Opt in to preview features** in the **{% data variables.product.prodname_copilot %} policies** page of the organization {% ifversion ghec %}or enterprise{% endif %} settings. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#enabling-copilot-features-in-your-organization){% ifversion ghec %} and [AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#copilot-in-githubcom){% endif %}.
87
90
88
-
By default, users request a review from {% data variables.product.prodname_copilot_short %} in the same way as they do from human reviewers. However, you can update or create an organization-level branch ruleset to automatically add {% data variables.product.prodname_copilot_short %} as a reviewer to all pull requests made to selected branches in all or selected repositories. For more information, see [AUTOTITLE](/copilot/using-github-copilot/code-review/using-copilot-code-review#enabling-automatic-reviews-from-copilot).
91
+
By default, users request a review from {% data variables.product.prodname_copilot_short %} in the same way as they do from human reviewers. However, you can update or create an organization-level branch ruleset to automatically add {% data variables.product.prodname_copilot_short %} as a reviewer to all pull requests made to selected branches in all or selected repositories. See [AUTOTITLE](/copilot/using-github-copilot/code-review/configuring-automatic-code-review-by-copilot).
89
92
90
93
{% data variables.product.prodname_copilot_short %} leaves a review comment on each pull request it reviews, without approving the pull request or requesting changes. This ensures that its review is advisory and will not block development work. Similarly, you should not enforce the resolution of suggestions made by {% data variables.product.prodname_copilot_short %} because AI suggestions have known limitations, see [AUTOTITLE](/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review#limitations-of-github-copilot-code-review).
Copy file name to clipboardexpand all lines: content/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ redirect_from:
14
14
---
15
15
16
16
> [!NOTE]
17
-
> * {% data variables.copilot.copilot_code-review %} is in {% data variables.release-phases.public_preview %} and subject to change. To join the waitlist, see [Join the {% data variables.copilot.copilot_code-review_short %} waitlist](https://gh.io/copilot-code-review-waitlist).
17
+
> * {% data variables.copilot.copilot_code-review %} is in {% data variables.release-phases.public_preview %} and subject to change. To access the {% data variables.release-phases.public_preview %}, see [Join the preview for {% data variables.copilot.copilot_code-review_short %}-powered code reviews](https://gh.io/copilot-code-review-waitlist).
18
18
> * The [AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-pre-release-license-terms) apply to your use of this product.
19
19
20
20
## About {% data variables.copilot.copilot_code-review %}
title: Configuring automatic code review by Copilot
3
+
shortTitle: Automatic code review
4
+
intro: "Learn how to configure {% data variables.product.prodname_copilot_short %} to automatically review pull requests in a repository."
5
+
versions:
6
+
feature: copilot
7
+
topics:
8
+
- Copilot
9
+
---
10
+
11
+
## About automatic code review
12
+
13
+
By default, {% data variables.product.prodname_copilot_short %} will only review a pull request when it is assigned to the pull request in the same way you would assign a human reviewer. However, repository owners can configure {% data variables.product.prodname_copilot_short %} to automatically review all pull requests in the repository. Organization owners can configure {% data variables.product.prodname_copilot_short %} to automatically review all pull requests in some or all of the repositories in the organization.
14
+
15
+
### Triggering an automatic pull request review
16
+
17
+
After you configure automatic code review, {% data variables.product.prodname_copilot_short %} will review pull requests in the following situations:
18
+
19
+
* When a pull request is created as an "Open" pull request.
20
+
21
+
A review is not triggered if the pull request is created as a "Draft" pull request.
22
+
23
+
* The first time a "Draft" pull request is switched to "Open".
24
+
25
+
> [!NOTE]
26
+
> {% data variables.product.prodname_copilot_short %} only automatically reviews a pull request once. If you make changes to the pull request after it has been automatically reviewed and you want {% data variables.product.prodname_copilot_short %} to re-review the pull request, you must request this manually. To do this, click the {% octicon "sync" aria-label="Re-request review" %} button next to {% data variables.product.prodname_copilot_short %}'s name in the **Reviewers** menu.
27
+
28
+
## Configuring automatic code review for a single repository
29
+
30
+
{% data reusables.repositories.navigate-to-repo %}
31
+
{% data reusables.repositories.sidebar-settings %}
32
+
{% data reusables.repositories.repo-rulesets-settings %}
33
+
{% data reusables.repositories.repo-new-ruleset %}
34
+
1. Under "Target branches," click **Add target** and choose one of the options—for example, **Include default branch** or **Include all branches**.
35
+
1. Under "Branch rules," select the **Require a pull request before merging** checkbox.
36
+
37
+
This expands a set of subsidiary options.
38
+
39
+
1. Select the **Request pull request review from {% data variables.product.prodname_copilot_short %}** checkbox.
40
+
41
+

42
+
43
+
1. At the bottom of the page, click **Create**.
44
+
45
+
## Configuring automatic code review for repositories in an organization
46
+
47
+
{% data reusables.profile.access_org %}
48
+
{% data reusables.profile.org_settings %}
49
+
{% data reusables.organizations.access-ruleset-settings %}
50
+
{% data reusables.repositories.repo-new-ruleset %}
51
+
1. Under "Target repositories," click **Add target** and choose either **Include by pattern** or **Exclude by pattern**.
52
+
1. In the dialog box that's displayed, type a pattern that will match the names of repositories in your organization—for example, `*feature` to match all repositories with names that end in `feature`.
53
+
54
+
For information about pattern-matching syntax, see [AUTOTITLE](/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization#using-fnmatch-syntax).
55
+
56
+
1. In the dialog box, click **Add inclusion pattern** or **Add exclusion pattern**.
57
+
1. Repeat the process for any additional patterns you want to add.
58
+
59
+
> [!NOTE]
60
+
> 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`.
61
+
62
+
1. Under "Target branches," click **Add target** and choose one of the target options.
63
+
1. Under "Branch rules," select the **Require a pull request before merging** checkbox.
64
+
65
+
This expands a set of subsidiary options.
66
+
67
+
1. Select the **Request pull request review from {% data variables.product.prodname_copilot_short %}** checkbox.
{% data reusables.copilot.code-review.preview-note %}
17
+
{% webui %}
18
+
19
+
> [!NOTE]
20
+
>
21
+
> {% data reusables.copilot.code-review.preview-note %}
22
+
> * If you get a {% data variables.product.prodname_copilot_short %} subscription from an organization, you will only be able to participate in the {% data variables.release-phases.public_preview %} on the {% data variables.product.github %} website if an owner of your organization {% ifversion ghec %}or enterprise{% endif %} has enabled **{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %} > Opt in to preview features** in the **{% data variables.product.prodname_copilot %} policies** page of the organization {% ifversion ghec %}or enterprise{% endif %} settings. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#enabling-copilot-features-in-your-organization){% ifversion ghec %} and [AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#copilot-in-githubcom){% endif %}.
23
+
24
+
{% endwebui %}
25
+
26
+
{% vscode %}
27
+
28
+
> [!NOTE]
29
+
>
30
+
> {% data reusables.copilot.code-review.preview-note %}
31
+
> * If you get a {% data variables.product.prodname_copilot_short %} subscription from an organization, you will only be able to participate in the {% data variables.release-phases.public_preview %} in {% data variables.product.prodname_vscode_shortname %} if an owner of your organization {% ifversion ghec %}or enterprise{% endif %} has enabled **Editor preview features** in the **{% data variables.product.prodname_copilot %} policies** page of the organization {% ifversion ghec %}or enterprise{% endif %} settings. See [AUTOTITLE](/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#enabling-copilot-features-in-your-organization){% ifversion ghec %} and [AUTOTITLE](/copilot/managing-copilot/managing-copilot-for-your-enterprise/managing-policies-and-features-for-copilot-in-your-enterprise#copilot-in-githubcom){% endif %}.
32
+
33
+
{% endvscode %}
18
34
19
35
## About {% data variables.copilot.copilot_code-review_short %}
20
36
@@ -35,7 +51,7 @@ The current functionality and availability of the two types of review is summari
35
51
| Description | Initial review of a highlighted section of code with feedback and suggestions | Deeper review of all changes |
36
52
| Language support | All | C#, Go, Java, JavaScript, Markdown, Python, Ruby, TypeScript |
37
53
| Custom coding guidelines support | No | Yes, see [Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines](#customizing-copilots-reviews-with-coding-guidelines)|
38
-
| Availability | {% data variables.release-phases.public_preview_caps %}, available to all {% data variables.product.prodname_copilot_short %} subscribers | {% data variables.release-phases.public_preview_caps %}with waitlist, see [Join the {% data variables.copilot.copilot_code-review_short %} waitlist](https://gh.io/copilot-code-review-waitlist)|
54
+
| Availability | {% data variables.release-phases.public_preview_caps %}, available to all {% data variables.product.prodname_copilot_short %} subscribers | {% data variables.release-phases.public_preview_caps %}, available with {% data variables.product.prodname_copilot_pro_short %}, {% data variables.product.prodname_copilot_business_short %}, and {% data variables.product.prodname_copilot_enterprise_short %} subscriptions.|
39
55
40
56
{% endrowheaders %}
41
57
@@ -51,7 +67,8 @@ These instructions explain how to use {% data variables.copilot.copilot_code-rev
51
67
52
68
### Requesting a pull request review from {% data variables.product.prodname_copilot_short %}
53
69
54
-
> [!NOTE] Requesting a pull request review from {% data variables.product.prodname_copilot_short %} is currently only available to a limited number of {% data variables.product.prodname_copilot_short %} subscribers. To join the waitlist, see [Join the {% data variables.copilot.copilot_code-review_short %} waitlist](https://gh.io/copilot-code-review-waitlist).
70
+
> [!NOTE]
71
+
> To access the {% data variables.release-phases.public_preview %} of this feature, see [Join the preview for {% data variables.copilot.copilot_code-review_short %}-powered code reviews](https://gh.io/copilot-code-review-waitlist).
55
72
56
73
1. On {% data variables.product.prodname_dotcom_the_website %}, create a pull request or navigate to an existing pull request.
57
74
1. Open the **Reviewers** menu, then select **{% data variables.product.prodname_copilot_short %}**.
@@ -98,15 +115,9 @@ To request a re-review from {% data variables.product.prodname_copilot_short %},
98
115
99
116
> [!NOTE] When re-reviewing a pull request, {% data variables.product.prodname_copilot_short %} may repeat the same comments again, even if they have been dismissed with the "Resolve conversation" button or downvoted with the thumbs down (:-1:) button.
100
117
101
-
## Enabling automatic reviews from {% data variables.product.prodname_copilot_short %}
102
-
103
-
By default, you will have to manually request a review from {% data variables.product.prodname_copilot_short %} on each pull request.
104
-
105
-
You can enable automatic reviews from {% data variables.product.prodname_copilot_short %} on all pull requests using rulesets configured at the repository level or organization level. For more information, see [AUTOTITLE](/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets).
106
-
107
-
To turn this on, enable the **Request pull request review from {% data variables.product.prodname_copilot_short %}** branch rule, nested under **Require a pull request before merging**.
118
+
## Enabling automatic reviews
108
119
109
-

120
+
By default, you manually request a review from {% data variables.product.prodname_copilot_short %} on each pull request, in the same way you would request a review from a human. However, you can set up {% data variables.product.prodname_copilot_short %} to automatically review all pull requests in a repository, or for all repositories in an organization. See [AUTOTITLE](/copilot/using-github-copilot/code-review/configuring-automatic-code-review-by-copilot).
110
121
111
122
## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines
112
123
@@ -144,16 +155,17 @@ You can request an initial review of a highlighted selection of code in {% data
144
155
145
156
### Reviewing changes
146
157
147
-
> [!NOTE] Reviewing changes is currently only available to a limited number of {% data variables.product.prodname_copilot_short %} subscribers. To join the waitlist, see [Join the {% data variables.copilot.copilot_code-review_short %} waitlist](https://gh.io/copilot-code-review-waitlist).
158
+
> [!NOTE]
159
+
> To access the {% data variables.release-phases.public_preview %} of this feature, see [Join the preview for {% data variables.copilot.copilot_code-review_short %}-powered code reviews](https://gh.io/copilot-code-review-waitlist).
148
160
149
161
You can request a review for your staged or unstaged changes in {% data variables.product.prodname_vscode %}.
150
162
151
163
1. In {% data variables.product.prodname_vscode_shortname %}, switch to the **Source Control** tab.
152
-
1. To request a review on your unstaged changes, hover over **Changes** in the sidebar, and then click the <svgclass="octicon"width="16"height="16"xmlns="http://www.w3.org/2000/svg"fill="currentColor"><pathd="M14.5 2H1.5L1 2.5V11.5L1.5 12H4V14.5L4.854 14.854L7.707 12H14.5L15 11.5V2.5L14.5 2ZM14 11H7.5L7.146 11.146L5 13.293V11.5L4.5 11H2V3H14V11Z"/><pathd="M7.079 5.205L5.262 7.033L7.078 8.853L6.371 9.56L4.2 7.386V6.679L6.37 4.5L7.079 5.205ZM9.7 4.505L9 5.214L10.826 7.033L8.995 8.853L9.7 9.562L11.889 7.389V6.68L9.7 4.505Z"/></svg>**{% data variables.copilot.copilot_code-review_short %} - Changes** button.
164
+
1. To request a review on your unstaged changes, hover over **Changes** in the sidebar, and then click the {% data reusables.copilot.code-review.staging-icon-vscode %}**{% data variables.copilot.copilot_code-review_short %} - Changes** button.
153
165
154
166

155
167
156
-
1. To request a review on your staged changes, hover over **Staged Changes** in the sidebar, and then click the <svgclass="octicon"width="16"height="16"xmlns="http://www.w3.org/2000/svg"fill="currentColor"><pathd="M14.5 2H1.5L1 2.5V11.5L1.5 12H4V14.5L4.854 14.854L7.707 12H14.5L15 11.5V2.5L14.5 2ZM14 11H7.5L7.146 11.146L5 13.293V11.5L4.5 11H2V3H14V11Z"/><pathd="M7.079 5.205L5.262 7.033L7.078 8.853L6.371 9.56L4.2 7.386V6.679L6.37 4.5L7.079 5.205ZM9.7 4.505L9 5.214L10.826 7.033L8.995 8.853L9.7 9.562L11.889 7.389V6.68L9.7 4.505Z"/></svg>**{% data variables.copilot.copilot_code-review_short %} - Staged Changes** button.
168
+
1. To request a review on your staged changes, hover over **Staged Changes** in the sidebar, and then click the {% data reusables.copilot.code-review.staging-icon-vscode %}**{% data variables.copilot.copilot_code-review_short %} - Staged Changes** button.
157
169
158
170
1. Wait for {% data variables.product.prodname_copilot_short %} to review your changes. This usually takes less than 30 seconds.
0 commit comments