Skip to content

Commit 89c3443

Browse files
authored
Merge pull request github#36544 from github/repo-sync
Repo sync
2 parents a291f76 + 0e16bbc commit 89c3443

File tree

57 files changed

+4779
-585
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4779
-585
lines changed

.github/dependabot.yml

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
version: 2
2+
23
registries:
34
ghcr: # Define access for a private registry
45
type: docker-registry
56
url: ghcr.io
67
username: PAT
78
password: ${{secrets.CONTAINER_BUILDER_TOKEN}}
9+
810
updates:
911
- package-ecosystem: npm
1012
directory: '/'
@@ -24,7 +26,7 @@ updates:
2426
directory: '/'
2527
schedule:
2628
interval: weekly
27-
day: wednesday
29+
day: tuesday
2830
ignore:
2931
- dependency-name: '*'
3032
update-types:
@@ -36,11 +38,8 @@ updates:
3638
- ghcr
3739
directory: '/'
3840
schedule:
39-
interval: weekly
40-
day: thursday
41+
interval: daily
4142
groups:
4243
baseImages:
4344
patterns:
4445
- '*'
45-
ignore:
46-
- dependency-name: 'node'
Loading

content/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts.md

+3
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,6 @@ You may have multiple code scanning configurations on a single repository. When
136136
* [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests)
137137
* [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning)
138138
* [AUTOTITLE](/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning)
139+
{%- ifversion copilot-hadron %}
140+
* [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)
141+
{%- endif %}

content/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests.md

+6
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,9 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler
169169
{% data reusables.code-scanning.false-positive-fix-codeql %}
170170

171171
For more information about dismissing alerts, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts#dismissing--alerts).
172+
173+
## Further reading
174+
175+
{%- ifversion copilot-hadron %}
176+
* [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)
177+
{%- endif %}

content/code-security/trialing-github-advanced-security/explore-trial-code-scanning.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ This allows you to update the configuration in a single location, but use the wo
8383

8484
### {% data variables.product.prodname_copilot_short %} review
8585

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 %}.
8790
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).
8992

9093
{% 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).
9194

content/copilot/responsible-use-of-github-copilot-features/responsible-use-of-github-copilot-code-review.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ redirect_from:
1414
---
1515

1616
> [!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).
1818
> * The [AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-pre-release-license-terms) apply to your use of this product.
1919
2020
## About {% data variables.copilot.copilot_code-review %}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
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+
![Screenshot of the "Request pull request review from {% data variables.product.prodname_copilot_short %}" branch ruleset option.](/assets/images/help/copilot/code-review/automatic-code-review.png)
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.
68+
1. At the bottom of the page, click **Create**.

content/copilot/using-github-copilot/code-review/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ topics:
99
children:
1010
- /using-copilot-code-review
1111
- /configuring-coding-guidelines
12+
- /configuring-automatic-code-review-by-copilot
1213
---

content/copilot/using-github-copilot/code-review/using-copilot-code-review.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Using GitHub Copilot code review
33
shortTitle: Using code review
44
intro: "Learn how to request a code review from {% data variables.product.prodname_copilot %}."
55
allowTitleToDifferFromFilename: true
6-
product: '{% data reusables.gated-features.copilot-free-availability %}'
6+
product: 'See the table below.'
77
versions:
88
feature: copilot
99
topics:
@@ -14,7 +14,23 @@ redirect_from:
1414
- /early-access/copilot/code-reviews/using-copilot-code-reviews
1515
---
1616

17-
{% 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 %}
1834

1935
## About {% data variables.copilot.copilot_code-review_short %}
2036

@@ -35,7 +51,7 @@ The current functionality and availability of the two types of review is summari
3551
| Description | Initial review of a highlighted section of code with feedback and suggestions | Deeper review of all changes |
3652
| Language support | All | C#, Go, Java, JavaScript, Markdown, Python, Ruby, TypeScript |
3753
| 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. |
3955

4056
{% endrowheaders %}
4157

@@ -51,7 +67,8 @@ These instructions explain how to use {% data variables.copilot.copilot_code-rev
5167

5268
### Requesting a pull request review from {% data variables.product.prodname_copilot_short %}
5369

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).
5572
5673
1. On {% data variables.product.prodname_dotcom_the_website %}, create a pull request or navigate to an existing pull request.
5774
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 %},
98115

99116
> [!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.
100117
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
108119

109-
![Screenshot of the "Request pull request review from {% data variables.product.prodname_copilot_short %}" branch rule.](/assets/images/help/copilot/code-review/request-review-[email protected])
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).
110121

111122
## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines
112123

@@ -144,16 +155,17 @@ You can request an initial review of a highlighted selection of code in {% data
144155

145156
### Reviewing changes
146157

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).
148160
149161
You can request a review for your staged or unstaged changes in {% data variables.product.prodname_vscode %}.
150162

151163
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 <svg class="octicon" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="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"/><path d="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.
153165

154166
![Screenshot of the "{% data variables.copilot.copilot_code-review_short %} - Changes" button in {% data variables.product.prodname_vscode %}. The code review button is outlined in dark orange.](/assets/images/help/copilot/code-review/[email protected])
155167

156-
1. To request a review on your staged changes, hover over **Staged Changes** in the sidebar, and then click the <svg class="octicon" width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="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"/><path d="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.
157169

158170
1. Wait for {% data variables.product.prodname_copilot_short %} to review your changes. This usually takes less than 30 seconds.
159171

0 commit comments

Comments
 (0)