Skip to content

Commit 99eb884

Browse files
hubwriterCopilot
andauthored
New auto-CCR sub-options and docs for org-level custom instructions (#56922)
Co-authored-by: Copilot <[email protected]>
1 parent 309d1c0 commit 99eb884

File tree

7 files changed

+33
-28
lines changed

7 files changed

+33
-28
lines changed
-57 KB
Loading
157 KB
Loading

content/copilot/concepts/code-review.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,18 @@ By default, {% data variables.product.prodname_copilot_short %} will only review
7878

7979
### Triggering an automatic pull request review
8080

81-
After you configure automatic code review, {% data variables.product.prodname_copilot_short %} will review pull requests in the following situations:
81+
The triggers for automatic code review depend on the configuration settings:
8282

83-
* When a pull request is created as an "Open" pull request.
84-
85-
A review is not triggered if the pull request is created as a "Draft" pull request.
86-
87-
* The first time a "Draft" pull request is switched to "Open".
83+
* **Basic setting**:
84+
* When a pull request is created as an "Open" pull request.
85+
* The first time a "Draft" pull request is switched to "Open".
86+
* **Review new pushes**:
87+
* Every time a new commit is pushed to the pull request.
88+
* **Review draft pull requests**:
89+
* Pull requests are automatically reviewed while they are still drafts—before being switched to "Open".
8890

8991
> [!NOTE]
90-
> {% 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.
92+
> Unless {% data variables.product.prodname_copilot_short %} has been configured to review each push to a pull request, it will only review the 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 can 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.
9193
9294
### Limits on automatic pull request reviews
9395

content/copilot/how-tos/configure-custom-instructions/add-repository-instructions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ Repository custom instructions are currently supported for:
7575

7676
{% vscode %}
7777

78-
* The **Use Instruction Files** option must be enabled in your settings. This is enabled by default. See [Enabling or disabling repository custom instructions](#enabling-or-disabling-repository-custom-instructions) later in this article.
78+
* Custom instructions must be enabled. This feature is enabled by default. See [Enabling or disabling repository custom instructions](#enabling-or-disabling-repository-custom-instructions-1) later in this article.
7979

8080
{% endvscode %}
8181

8282
{% visualstudio %}
8383

84-
* The **Enable custom instructions...** option must be enabled in your settings. This is enabled by default. See [Enabling or disabling repository custom instructions](#enabling-or-disabling-repository-custom-instructions) later in this article.
84+
* The **Enable custom instructions...** option must be enabled in your settings. This is enabled by default. See [Enabling or disabling repository custom instructions](#enabling-or-disabling-repository-custom-instructions-2) later in this article.
8585

8686
{% endvisualstudio %}
8787

@@ -534,6 +534,8 @@ Your choice persists, for all repositories containing a custom instructions file
534534
1. In the "Options" dialog, type `custom instructions` in the search box, then click **{% data variables.product.prodname_copilot_short %}**.
535535
1. Select or clear the checkbox for **Enable custom instructions to be loaded from .github/copilot-instructions.md files and added to requests**.
536536

537+
![Screenshot of the {% data variables.product.prodname_vs %} Options dialog showing the "Enable custom instructions" option checkbox selected.](/assets/images/help/copilot/vs-custom-instructions-option.png)
538+
537539
{% data reusables.copilot.custom-instructions-enabling-for-ccr %}
538540

539541
{% endvisualstudio %}

content/copilot/how-tos/configure-custom-instructions/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,3 @@ redirect_from:
1414
- /copilot/how-tos/custom-instructions
1515
contentType: how-tos
1616
---
17-

content/copilot/how-tos/use-copilot-agents/request-a-code-review/configure-automatic-review.md

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ This article tells you how to set up {% data variables.copilot.copilot_code-revi
2222

2323
The three sections in this article tell you how to configure automatic code review for:
2424

25-
* [Pull requests that you create yourself](#configuring-automatic-code-review-for-all-pull-requests-you-create)
25+
* [Pull requests that you create yourself](#configuring-automatic-code-review-for-your-own-pull-requests)
2626
* [All new pull requests in a repository](#configuring-automatic-code-review-for-a-single-repository)
2727
* [Pull requests in multiple repositories owned by an organization](#configuring-automatic-code-review-for-repositories-in-an-organization)
2828

29-
## Configuring automatic code review for all pull requests you create
29+
## Configuring automatic code review for your own pull requests
3030

3131
> [!NOTE]
3232
> This is only available if you are on the {% data variables.copilot.copilot_pro_short %} or {% data variables.copilot.copilot_pro_plus_short %} plan.
@@ -45,15 +45,7 @@ The three sections in this article tell you how to configure automatic code revi
4545
{% data reusables.repositories.repo-rulesets-settings %}
4646
{% data reusables.repositories.repo-new-ruleset %}
4747
1. Under "Target branches," click **Add target** and choose one of the options—for example, **Include default branch** or **Include all branches**.
48-
1. Under "Branch rules," select the **Require a pull request before merging** checkbox.
49-
50-
This expands a set of subsidiary options.
51-
52-
1. Select the **Request pull request review from {% data variables.product.prodname_copilot_short %}** checkbox.
53-
54-
![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)
55-
56-
1. At the bottom of the page, click **Create**.
48+
{% data reusables.copilot.auto-code-review-steps %}
5749

5850
## Configuring automatic code review for repositories in an organization
5951

@@ -72,10 +64,4 @@ The three sections in this article tell you how to configure automatic code revi
7264
> [!NOTE]
7365
> 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`.
7466
75-
1. Under "Target branches," click **Add target** and choose one of the target options.
76-
1. Under "Branch rules," select the **Require a pull request before merging** checkbox.
77-
78-
This expands a set of subsidiary options.
79-
80-
1. Select the **Request pull request review from {% data variables.product.prodname_copilot_short %}** checkbox.
81-
1. At the bottom of the page, click **Create**.
67+
{% data reusables.copilot.auto-code-review-steps %}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
1. Under "Target branches," click **Add target** and choose one of the target options.
2+
1. Under "Branch rules," select **Automatically request {% data variables.copilot.copilot_code-review_short %}**.
3+
4+
This expands a set of subsidiary options.
5+
6+
![Screenshot of the "Automatically request {% data variables.copilot.copilot_code-review_short %}" branch ruleset option.](/assets/images/help/copilot/code-review/automatic-code-review.png)
7+
8+
1. Optionally, if you want {% data variables.product.prodname_copilot_short %} to review all new pushes to the pull request, select **Review new pushes**.
9+
10+
If this option is not selected, {% data variables.product.prodname_copilot_short %} will only review the pull request once.
11+
12+
1. Optionally, if you want {% data variables.product.prodname_copilot_short %} to review pull requests while they are still drafts, select the **Review draft pull requests**.
13+
14+
This can be a useful option for catching errors early, before requesting a human review.
15+
16+
1. At the bottom of the page, click **Create**.

0 commit comments

Comments
 (0)