Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo sync #36544

Merged
merged 11 commits into from
Feb 27, 2025
Merged
9 changes: 4 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
version: 2

registries:
ghcr: # Define access for a private registry
type: docker-registry
url: ghcr.io
username: PAT
password: ${{secrets.CONTAINER_BUILDER_TOKEN}}

updates:
- package-ecosystem: npm
directory: '/'
Expand All @@ -24,7 +26,7 @@ updates:
directory: '/'
schedule:
interval: weekly
day: wednesday
day: tuesday
ignore:
- dependency-name: '*'
update-types:
Expand All @@ -36,11 +38,8 @@ updates:
- ghcr
directory: '/'
schedule:
interval: weekly
day: thursday
interval: daily
groups:
baseImages:
patterns:
- '*'
ignore:
- dependency-name: 'node'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,6 @@ You may have multiple code scanning configurations on a single repository. When
* [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests)
* [AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning)
* [AUTOTITLE](/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning)
{%- ifversion copilot-hadron %}
* [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)
{%- endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,9 @@ An alternative way of closing an alert is to dismiss it. You can dismiss an aler
{% data reusables.code-scanning.false-positive-fix-codeql %}

For more information about dismissing alerts, see [AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/resolving-code-scanning-alerts#dismissing--alerts).

## Further reading

{%- ifversion copilot-hadron %}
* [AUTOTITLE](/copilot/using-github-copilot/using-github-copilot-for-pull-requests/using-copilot-to-help-you-work-on-a-pull-request)
{%- endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ This allows you to update the configuration in a single location, but use the wo

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

{% data reusables.copilot.code-review.preview-note %}
> [!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 **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 %}.

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).
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).

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ redirect_from:
---

> [!NOTE]
> * {% 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).
> * {% 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).
> * The [AUTOTITLE](/free-pro-team@latest/site-policy/github-terms/github-pre-release-license-terms) apply to your use of this product.

## About {% data variables.copilot.copilot_code-review %}
Expand Down
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.

![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)

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**.
1 change: 1 addition & 0 deletions content/copilot/using-github-copilot/code-review/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ topics:
children:
- /using-copilot-code-review
- /configuring-coding-guidelines
- /configuring-automatic-code-review-by-copilot
---
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 %}

Expand All @@ -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 %}

Expand All @@ -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 %}**.
Expand Down Expand Up @@ -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

![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])
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

Expand Down Expand Up @@ -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.

![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])

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.

Expand Down
Loading
Loading