翻篇收录说明
翻篇网页快照

GitHub Copilot code review - GitHub Docs

https://docs.github.com/en/copilot/concepts/agent-capabilities/agent-powered-workflows-and-operations/code-review

最近抓取:2026-12-05 13:15:11(北京时间)

最近内容变化:2026-12-03 00:45:02(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Copilot reviews your pull requests, identifies issues, and suggests fixes you can apply in a couple of clicks.

正文摘录

In this articleGitHub Copilot code reviewCopilot reviews your pull requests, identifies issues, and suggests fixes you can apply in a couple of clicks.Copy markdownWho can use this feature?Available for all paid Copilot plans.In this articleIntroduction Copilot code review reviews code written in any language, and provides feedback. It reviews your code from multiple angles to identify issues and suggest fixes. You can apply suggested changes with a couple of clicks. This article provides an overview of Copilot code review. To learn how to request a code review from Copilot, see Using GitHub Copilot code review. Availability Copilot code review is supported in: GitHub.com GitHub CLI GitHub Mobile VS Code Visual Studio Xcode JetBrains IDEs Azure DevOps Note If you receive Copilot from an organization, your organization must enable the Copilot code review option in the Copilot policy settings. This applies to reviews on GitHub.com or in GitHub Mobile. See Managing policies and features for GitHub Copilot in your organization. Copilot code review without a Copilot license Organization members without a Copilot license can use Copilot code review on GitHub.com. An enterprise administrator or organization owner must enable it. This capability is available to organizations on Copilot Business and Copilot Enterprise plans, and to organizations in enterprises that use Copilot access. The organization doesn't need to assign any Copilot licenses. For steps, see Enabling GitHub Copilot code review in your organization or Enabling GitHub Copilot code review in your enterprise. Enabling code review for users without a license To allow organization members without a Copilot license to use Copilot code review, you must enable two policies: AI credits paid usage. Enable this policy first. It allows the enterprise or organization to incur charges for Copilot code review AI credits usage. Allow members without a Copilot license to use Copilot code review in GitHub.com. This sub-policy enables Copilot code review for users without a license. The second policy has these characteristics: It is disabled by default. Once this policy is set at the enterprise level, it becomes visible, but not editable at the organization level. The policy is most restrictive. Copilot code review is only available in repositories under an organization where you have explicitly enabled the policy. How it works for users without a license When both policies are enabled, users without a Copilot license can request a review from Copilot code review on their pull requests in the organization's repositories. In repositories where automatic code review is enabled, Copilot automatically reviews all pull requests. This happens regardless of whether the author has a Copilot license. For more information about how to configure automatic code review, see Configuring code review by GitHub Copilot. Copilot code review for users without a license is not available in IDEs. Agentic capabilities for Copilot code review Copilot code review utilizes agentic capabilities to extend its functionality. Full project context gathering. This provides more specific, accurate, and contextually aware code reviews. This capability analyzes your entire repository to better understand the context of code changes. Cross-repository context. On GitHub.com, Copilot can search the default branch of related public repositories during a review to find code that depends on your change and related context, such as documentation. Repository administrators can manage this with the Search public repositories setting. If you receive Copilot from an organization or enterprise, the Opt in to preview features policy must be enabled. See Opting in to previews or feedback. Note Cross-repository context for Copilot code review is in public preview and subject to change. The ability to pass suggestions to Copilot cloud agent. This automates creating a new pull request against your branch with the suggested fixes applied. Passing suggestions to Copilot cloud agent is in public preview and subject to change. These capabilities are enabled automatically for all plans that include Copilot code review. See Review effort level later in this article for information about choosing between Lite, Balanced, and Max analysis levels. If GitHub Actions is unavailable or if Actions workflows used by Copilot code review fail, reviews will still be generated. However, they will not include the additional features provided by the agentic capabilities. Usage of GitHub Actions runners for agentic capabilities in code review Copilot code review uses GitHub Actions to run the agentic capabilities, including full project context gathering and passing suggestions to Copilot cloud agent. By default, Copilot code review uses standard GitHub-hosted runners. You can also upgrade to larger GitHub-hosted runners for better performance, or use self-hosted runners. Note Usage of larger GitHub-hosted runners is billed at a higher per-minute rate. Self-hosted runners do not consume GitHub Actions minutes. You do not need to have GitHub Actions enabled in your organization or enterprise to use the agentic capabilities in code review. If your organization has disabled GitHub-hosted runners, the agentic capabilities will not be available. In this case, code reviews will fall back to a more limited review. Organizations in this situation can use self-hosted runners. For more information on configuring runners, see Configuring runners for GitHub Copilot code review. You can view the GitHub Actions minutes associated with Copilot code review runs. For more information, see GitHub Actions minutes for code review. Estimated consumption The following table shows the estimated AI credits consumption of a single review at each review effort level. Review effort levelTypical range per reviewApproximate average per reviewLite$0.05 USD to $1 USD$0.25 USDBalanced$0.25 USD to $5 USD$1.50 USDMax$1.50 USD to $25 USD$10 USD These figures are estimates only. Consumption generally increases with pull request size and repository custom instructions. Actual costs can fall outside these ranges and may change as models evolve. Estimates exclude GitHub Actions minutes. If you choose Adaptive as the review effort level, Copilot selects Lite, Balanced, or Max within the configured maximum review effort. Estimated consumption varies depending on the effort level selected. Repository and organization administrators can set the default review effort level for automatic code reviews. For configuration steps, see Configuring code review by GitHub Copilot. Code review usage and billing Each time Copilot reviews a pull request or reviews code in your IDE, the interaction consumes AI credits. The amount depends on the model used and the number of tokens processed. Code reviews have two cost components: AI credits for the model interaction (the review itself), and GitHub Actions minutes for the agentic capabilities (context gathering and tool use). For more information on GitHub Actions usage, see Usage of GitHub Actions runners for agentic capabilities in code review. When a repository automatically requests a review billed to a member, AI credits consumption is attributed to the pull request author. If another user manually requests a review, consumption is attributed to that user instead. For pull requests authored by Copilot cloud agent, usage is attributed first to the human co-author associated with the change. If the co-author cannot be billed, usage is billed directly to the organization. For pull requests authored by other bots, or when a bot requests the review, usage is billed directly to the organization. These pull requests are eligible for agentic review. Dependency vulnerability and license compliance scans add to the AI credits a review uses. Enterprise or organization owners can choose the billing source for requests associated with organization members who have paid Copilot licenses. They can bill the member's entitlement or the organization that owns the repository. Billing the organization requires AI credits 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 Copilot code review. Default billing for licensed members If an administrator has not saved a billing choice, eligible reviews associated with members who have paid Copilot licenses are billed to the organization that owns the repository. Organization settings respect inherited enterprise policies. To bill members' entitlements instead, select Member in your enterprise or organization settings. Organization-funded reviews can increase your organization's spending. The separate setting for members without a Copilot license is off by default. Choosing a billing source for licensed members does not enable access for members without a license or change GitHub Actions billing. Users without a Copilot license or plan that includes Copilot code review Users without access to Copilot code review do not have a monthly allowance of AI credits for it. This includes users who have no Copilot license and users on the Copilot Free plan, which does not include Copilot code review. When Copilot code review is enabled for these users, any AI credits they consume are billed directly to the organization or enterprise as paid additional usage. This applies to both manually requested reviews and automatic code reviews. AI credits consumed by these users are not attributed to any individual user's budget. They appear as additional usage in billing reports. What happens when a budget is reached For Copilot Business and Copilot Enterprise, 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 applica