forked from github/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request github#36544 from github/repo-sync
Repo sync
- Loading branch information
Showing
57 changed files
with
4,779 additions
and
585 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
...sing-github-copilot/code-review/configuring-automatic-code-review-by-copilot.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Configuring automatic code review by Copilot | ||
shortTitle: Automatic code review | ||
intro: "Learn how to configure {% data variables.product.prodname_copilot_short %} to automatically review pull requests in a repository." | ||
versions: | ||
feature: copilot | ||
topics: | ||
- Copilot | ||
--- | ||
|
||
## About automatic code review | ||
|
||
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. | ||
|
||
### Triggering an automatic pull request review | ||
|
||
After you configure automatic code review, {% data variables.product.prodname_copilot_short %} will review pull requests in the following situations: | ||
|
||
* When a pull request is created as an "Open" pull request. | ||
|
||
A review is not triggered if the pull request is created as a "Draft" pull request. | ||
|
||
* The first time a "Draft" pull request is switched to "Open". | ||
|
||
> [!NOTE] | ||
> {% 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. | ||
## 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**. | ||
1. Under "Branch rules," select the **Require a pull request before merging** checkbox. | ||
|
||
This expands a set of subsidiary options. | ||
|
||
1. Select the **Request pull request review from {% data variables.product.prodname_copilot_short %}** checkbox. | ||
|
||
 | ||
|
||
1. At the bottom of the page, click **Create**. | ||
|
||
## 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**. | ||
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`. | ||
|
||
For information about pattern-matching syntax, see [AUTOTITLE](/organizations/managing-organization-settings/creating-rulesets-for-repositories-in-your-organization#using-fnmatch-syntax). | ||
|
||
1. In the dialog box, click **Add inclusion pattern** or **Add exclusion pattern**. | ||
1. Repeat the process for any additional patterns you want to add. | ||
|
||
> [!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`. | ||
1. Under "Target branches," click **Add target** and choose one of the target options. | ||
1. Under "Branch rules," select the **Require a pull request before merging** checkbox. | ||
|
||
This expands a set of subsidiary options. | ||
|
||
1. Select the **Request pull request review from {% data variables.product.prodname_copilot_short %}** checkbox. | ||
1. At the bottom of the page, click **Create**. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ title: Using GitHub Copilot code review | |
shortTitle: Using code review | ||
intro: "Learn how to request a code review from {% data variables.product.prodname_copilot %}." | ||
allowTitleToDifferFromFilename: true | ||
product: '{% data reusables.gated-features.copilot-free-availability %}' | ||
product: 'See the table below.' | ||
versions: | ||
feature: copilot | ||
topics: | ||
|
@@ -14,7 +14,23 @@ redirect_from: | |
- /early-access/copilot/code-reviews/using-copilot-code-reviews | ||
--- | ||
|
||
{% data reusables.copilot.code-review.preview-note %} | ||
{% webui %} | ||
|
||
> [!NOTE] | ||
> | ||
> {% data reusables.copilot.code-review.preview-note %} | ||
> * 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 %}. | ||
{% endwebui %} | ||
|
||
{% vscode %} | ||
|
||
> [!NOTE] | ||
> | ||
> {% data reusables.copilot.code-review.preview-note %} | ||
> * 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 %}. | ||
{% endvscode %} | ||
|
||
## About {% data variables.copilot.copilot_code-review_short %} | ||
|
||
|
@@ -35,7 +51,7 @@ The current functionality and availability of the two types of review is summari | |
| Description | Initial review of a highlighted section of code with feedback and suggestions | Deeper review of all changes | | ||
| Language support | All | C#, Go, Java, JavaScript, Markdown, Python, Ruby, TypeScript | | ||
| 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) | | ||
| 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) | | ||
| 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. | | ||
|
||
{% endrowheaders %} | ||
|
||
|
@@ -51,7 +67,8 @@ These instructions explain how to use {% data variables.copilot.copilot_code-rev | |
|
||
### Requesting a pull request review from {% data variables.product.prodname_copilot_short %} | ||
|
||
> [!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). | ||
> [!NOTE] | ||
> 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). | ||
1. On {% data variables.product.prodname_dotcom_the_website %}, create a pull request or navigate to an existing pull request. | ||
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 %}, | |
|
||
> [!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. | ||
## Enabling automatic reviews from {% data variables.product.prodname_copilot_short %} | ||
|
||
By default, you will have to manually request a review from {% data variables.product.prodname_copilot_short %} on each pull request. | ||
|
||
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). | ||
|
||
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**. | ||
## Enabling automatic reviews | ||
|
||
 | ||
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). | ||
|
||
## Customizing {% data variables.product.prodname_copilot_short %}'s reviews with coding guidelines | ||
|
||
|
@@ -144,16 +155,17 @@ You can request an initial review of a highlighted selection of code in {% data | |
|
||
### Reviewing changes | ||
|
||
> [!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). | ||
> [!NOTE] | ||
> 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). | ||
You can request a review for your staged or unstaged changes in {% data variables.product.prodname_vscode %}. | ||
|
||
1. In {% data variables.product.prodname_vscode_shortname %}, switch to the **Source Control** tab. | ||
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. | ||
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. | ||
|
||
 | ||
|
||
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. | ||
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. | ||
|
||
1. Wait for {% data variables.product.prodname_copilot_short %} to review your changes. This usually takes less than 30 seconds. | ||
|
||
|
Oops, something went wrong.