Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This article provides an overview of {% data variables.copilot.copilot_code-revi
## {% data variables.copilot.copilot_code-review_short %} without a {% data variables.product.prodname_copilot_short %} license

Organization members **without a {% data variables.product.prodname_copilot_short %} license** can use {% data variables.copilot.copilot_code-review_short %} on {% data variables.product.prodname_dotcom_the_website %}. An enterprise administrator or organization owner must enable it. This capability is available to organizations on **{% data variables.copilot.copilot_business_short %}** and **{% data variables.copilot.copilot_enterprise_short %}** plans.
Organization members **without a {% data variables.product.prodname_copilot_short %} license** can use {% data variables.copilot.copilot_code-review_short %} on {% data variables.product.prodname_dotcom_the_website %}. An enterprise administrator or organization owner must enable it. This capability is available to organizations on **{% data variables.copilot.copilot_business_short %}** and **{% data variables.copilot.copilot_enterprise_short %}** plans, and to organizations in enterprises that use **{% data variables.product.prodname_copilot_short %} access**. The organization doesn't need to assign any {% data variables.product.prodname_copilot_short %} licenses. For steps, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/enable-copilot-code-review) or [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/enable-copilot-code-review#allowing-reviews-without-a-copilot-license).

### Enabling code review for users without a license

Expand Down Expand Up @@ -120,18 +120,6 @@ For pull requests authored by other bots, or when a bot requests the review, usa

For requests associated with organization members who have paid {% data variables.product.prodname_copilot_short %} licenses, the member's entitlement is billed by default. An enterprise or organization owner can instead choose to bill the organization. Billing the organization requires {% data variables.product.prodname_ai_credits_short %} paid usage, but a budget is optional. This choice applies to both manually requested and automatic code reviews, and changes billing only. On its own, it does not grant access to {% data variables.copilot.copilot_code-review_short %}.

### Reviews requested with an external {% data variables.product.prodname_copilot_short %} license

By default, people can use an external {% data variables.product.prodname_copilot_short %} license to request a review from {% data variables.product.prodname_copilot_short %}. An external {% data variables.product.prodname_copilot_short %} license is one that is not provided by the organization or enterprise that owns the repository, such as a personal license or a license from another enterprise. Licenses assigned by another organization in the same enterprise do **not** count as external.

To prevent people from using an external {% data variables.product.prodname_copilot_short %} license to request reviews, organization owners and repository administrators can enable the **Block reviews requested with an external {% data variables.product.prodname_copilot_short %} license** setting for an organization or a single repository. When the setting is enabled:

* {% data variables.product.prodname_copilot_short %} is not offered as a reviewer to people who are not authorized, and API review requests from those people do not start a review.
* In personal repositories, only the repository owner or a direct collaborator can request a review.
* Automatic reviews from personal settings do not run for people who are not authorized. Automatic reviews configured by repository or organization rulesets still run.

For configuration steps, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/set-up-copilot/configure-code-review#customizing-copilot-code-review).

### Users without a {% data variables.product.prodname_copilot_short %} license or plan that includes {% data variables.copilot.copilot_code-review_short %}

Users without access to {% data variables.copilot.copilot_code-review_short %} do not have a monthly allowance of {% data variables.product.prodname_ai_credits_short %} for it. This includes users who have no {% data variables.product.prodname_copilot_short %} license and users on the {% data variables.copilot.copilot_free_short %} plan, which does not include {% data variables.copilot.copilot_code-review_short %}.
Expand All @@ -144,6 +132,12 @@ When {% data variables.copilot.copilot_code-review_short %} is enabled for these

For {% data variables.copilot.copilot_business_short %} and {% data variables.copilot.copilot_enterprise_short %}, code review access is governed by the budgets that apply to the selected billing source. If usage is billed to a user, code reviews are blocked when the user reaches their budget. If usage is billed to an organization, code reviews are blocked when the applicable organization budget, cost center budget, or enterprise spending limit is exhausted. Code reviews are blocked along with other {% data variables.product.prodname_ai_credits_short %}-consuming features. See [AUTOTITLE](/copilot/concepts/billing-and-usage/organizations-and-enterprises/budgets#what-happens-when-a-user-is-blocked).

### Reviews requested with an external {% data variables.product.prodname_copilot_short %} license

An external {% data variables.product.prodname_copilot_short %} license is one that is not provided by the organization or enterprise that owns the repository, such as a personal license or a license from another enterprise. Licenses assigned by another organization in the same enterprise are not external.

Organization owners and repository administrators can optionally block reviews that people request with an external license. This setting does not stop automatic reviews configured by repository or organization rulesets. When the setting is enabled, {% data variables.product.prodname_copilot_short %} is not offered as a reviewer to people using an external license, API review requests from those people do not start a review, and automatic reviews from their personal settings do not run. In personal repositories, only the repository owner or a direct collaborator can request a review. For configuration steps, see [AUTOTITLE](/copilot/how-tos/copilot-on-github/set-up-copilot/configure-code-review#customizing-copilot-code-review).

## Model usage

{% data reusables.copilot.ccr-model-usage %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ The policy for {% data variables.copilot.copilot_code-review_short %} allows you

{% data reusables.enterprise-accounts.policy-enablement-next-steps %}

## Allowing reviews without a {% data variables.product.prodname_copilot_short %} license

Members can get reviews on {% data variables.product.prodname_dotcom_the_website %} without a {% data variables.product.prodname_copilot_short %} license, including in enterprises that use {% data variables.product.prodname_copilot_short %} access, so you don't need to assign seats for code review. The {% data variables.product.prodname_ai_credits_short %} these reviews use are billed to your enterprise or a cost center.

{% data reusables.enterprise-accounts.access-enterprise %}
{% data reusables.enterprise-accounts.ai-controls-tab %}
1. In the sidebar, click {% octicon "copilot" aria-hidden="true" aria-label="copilot" %} **{% data variables.product.prodname_copilot_short %}**.
1. Under "Billing & usage", make sure "{% data variables.product.prodname_ai_credit_singular %} paid usage" is enabled.
1. Under "Features & clients", click **Configure features & clients**.
1. Make sure "{% data variables.copilot.copilot_code-review_short %}" is enabled.
1. Next to "Allow members without a {% data variables.product.prodname_copilot_short %} license to use {% data variables.copilot.copilot_code-review_short %} in {% data variables.product.prodname_dotcom_the_website %}", turn it on for every organization, or select **Let organizations decide**. If organizations decide, their owners follow [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-organization/enable-copilot-code-review).

## Configuring automatic code review

To apply standards consistently, you can configure {% data variables.copilot.copilot_code-review_short %} to run automatically on all pull requests opened across your enterprise or in specific repositories.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Enabling GitHub Copilot code review in your organization
intro: 'Turn on {% data variables.copilot.copilot_code-review_short %} for your organization''s pull requests without assigning a {% data variables.product.prodname_copilot_short %} license to any member.'
allowTitleToDifferFromFilename: true
permissions: Organization owners
product: '{% data reusables.copilot.enterprise-billing-availability %}'
versions:
feature: copilot
shortTitle: Enable {% data variables.copilot.copilot_code-review_short %}
contentType: how-tos
category:
- Manage Copilot for a team
---

After you enable the policy for {% data variables.copilot.copilot_code-review_short %}, members with a {% data variables.product.prodname_copilot_short %} license from your organization can request reviews. You can also allow reviews without a license. The {% data variables.product.prodname_ai_credits_short %} those reviews use are billed to your organization or enterprise.

## Subscribing to {% data variables.copilot.copilot_business_short %} without assigning licenses

Your organization needs a {% data variables.product.prodname_copilot_short %} plan and a payment method and billing information on file, but it doesn't need to assign any licenses. If your organization already has a plan, skip to [Enabling {% data variables.copilot.copilot_code-review_short %}](#enabling-copilot-code-review). If your organization is owned by an enterprise, an enterprise owner sets up the plan. See [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-plan/subscribe).

1. Navigate to the [{% data variables.product.prodname_copilot %} sign up page](https://github.com/github-copilot/purchase?ref_product=copilot&ref_type=purchase&ref_style=text).
1. Make sure you're signed in to the right organization account. If you aren't, click **{% octicon "arrow-switch" aria-hidden="true" aria-label="arrow-switch" %} Switch** and select the organization.
1. Click **Enable {% data variables.product.prodname_copilot %}**.

After you enable {% data variables.product.prodname_copilot_short %}, you don't need to assign any licenses. You're billed for {% data variables.copilot.copilot_business_short %} licenses only when you assign them.

## Enabling {% data variables.copilot.copilot_code-review_short %}

We recommend having your organization pay for every review, so that no pull request goes without a review. Otherwise, reviews for members who use their own {% data variables.product.prodname_copilot_short %} license, such as {% data variables.copilot.copilot_pro_short %}, stop when those members run out of {% data variables.product.prodname_ai_credits_short %}, and pull requests from authors without a license don't get reviews. To limit what your organization spends, see [Controlling spending](#controlling-spending).

If your organization is owned by an enterprise, you can't change settings that an enterprise owner has set. An enterprise owner can turn on reviews without a license or let organizations decide. See [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/enable-copilot-code-review#allowing-reviews-without-a-copilot-license).

{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}
1. {% data reusables.user-settings.code-planning-automation %} click **{% octicon "copilot" aria-hidden="true" aria-label="copilot" %} {% data variables.product.prodname_copilot_short %}**, then **Policies**.
1. Under "Billing," next to "{% data variables.product.prodname_ai_credit_singular %} paid usage," select **Enabled**, or select **Enabled for selected products** and turn on **Opt in to {% data variables.product.prodname_copilot_short %} AI Credits paid usage**.
1. Next to "{% data variables.copilot.copilot_code-review_short %}," select **Enabled**.
1. Next to "Choose how members with a {% data variables.product.prodname_copilot_short %} license are billed," select **Organization**.
1. Turn on **Allow reviews without a {% data variables.product.prodname_copilot_short %} license**. Reviews without a license include pull requests from outside contributors, members on {% data variables.copilot.copilot_free_short %}, and bots such as {% data variables.product.prodname_dependabot %}.

Pull requests in your organization can now get reviews from {% data variables.product.prodname_copilot_short %}, whether or not their authors have a license. Members without a license can't request reviews in IDEs.

## Configuring automatic code review

To have {% data variables.product.prodname_copilot_short %} review pull requests without anyone requesting a review, create a ruleset for the repositories where you want automatic reviews. After members without a license can use {% data variables.copilot.copilot_code-review_short %}, automatic reviews run on their pull requests too. See [AUTOTITLE](/copilot/how-tos/copilot-on-github/set-up-copilot/configure-code-review#configuring-automatic-code-review-for-repositories-in-an-organization).

## Controlling spending

If your organization isn't owned by an enterprise and has no assigned licenses, or is owned by an enterprise on the {% data variables.product.prodname_copilot_short %} access plan, it has no included {% data variables.product.prodname_ai_credits_short %}. Every review billed to it is paid usage.

To cap spending, create an organization budget for {% data variables.product.prodname_ai_credits_short %} and select **Stop usage when budget limit is reached**. At the limit, reviews that need paid usage stop until the next billing cycle or until you raise the budget. See [AUTOTITLE](/billing/how-tos/set-up-budgets).

If your organization is owned by an enterprise, create the budget in your enterprise account's billing settings, with your organization as its scope. An enterprise owner can also set a budget for a cost center or the whole enterprise. See [AUTOTITLE](/copilot/concepts/billing-and-usage/organizations-and-enterprises/budgets#how-billing-flows-through-budgets).

Reviews also use {% data variables.product.prodname_actions %} minutes. See [AUTOTITLE](/copilot/concepts/agent-capabilities/agent-powered-workflows-and-operations/code-review#code-review-usage-and-billing).
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ children:
- /manage-access
- /manage-policies
- /manage-copilot-in-the-cloud
- /enable-copilot-code-review
- /manage-app-copilot-access
- /configure-runner-for-coding-agent
- /prepare-for-custom-agents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ You can configure how {% data variables.copilot.copilot_code-review_short %} com
* **Allow {% data variables.product.prodname_copilot_short %} approvals to count toward merge requirements**: Toggle on so {% data variables.product.prodname_copilot_short %} approvals can satisfy pull request approval requirements.
* **File paths**: Optionally, limit which pull requests count toward merge requirements. Enter one file glob per line to count approvals only on pull requests where every changed file matches one of the globs. Leave blank to count approvals for all files. Up to 15 globs are supported.

1. To prevent people from using an external {% data variables.product.prodname_copilot_short %} license to request reviews in this repository, enable **Block reviews requested with an external {% data variables.product.prodname_copilot_short %} license**. If this setting is enabled for your organization, you cannot turn it off for the repository. See [AUTOTITLE](/copilot/concepts/agent-capabilities/agent-powered-workflows-and-operations/code-review#reviews-requested-with-an-external-copilot-license).
1. Optionally, to block reviews that people request with an external {% data variables.product.prodname_copilot_short %} license in this repository, enable **Block reviews requested with an external {% data variables.product.prodname_copilot_short %} license**. This setting does not stop automatic reviews from rulesets. If it is enabled for your organization, you cannot turn it off for the repository. See [AUTOTITLE](/copilot/concepts/agent-capabilities/agent-powered-workflows-and-operations/code-review#reviews-requested-with-an-external-copilot-license).
1. To prevent {% data variables.product.prodname_copilot_short %} from searching public repositories for context during reviews, turn off **Search public repositories**. This setting is on by default.

> [!NOTE]
Expand Down Expand Up @@ -151,7 +151,7 @@ You can configure how {% data variables.copilot.copilot_code-review_short %} com
* **Enable for selected repositories**: {% data variables.product.prodname_copilot_short %} approvals can count toward merge requirements only in the repositories you select. If you choose this option, also assign the repositories you want to enable this for.
* **Disabled everywhere**: {% data variables.product.prodname_copilot_short %} approvals cannot count toward merge requirements in any repository in the organization.

1. To prevent people from using an external {% data variables.product.prodname_copilot_short %} license to request reviews in your organization's repositories, enable **Block reviews requested with an external {% data variables.product.prodname_copilot_short %} license**. This setting applies to every repository in the organization, and repository administrators cannot turn it off.
1. Optionally, to block reviews that people request with an external {% data variables.product.prodname_copilot_short %} license in your organization's repositories, enable **Block reviews requested with an external {% data variables.product.prodname_copilot_short %} license**. This setting does not stop automatic reviews from rulesets. It applies to every repository in the organization, and repository administrators cannot turn it off.

## Configuring automatic code review for an enterprise

Expand Down
Loading