Introduction
GitHub Copilot can review your code and provide feedback. Where possible, Copilot's feedback includes suggested changes which you can apply with a couple of clicks.
Copilot can review code written in any programming language.
Copilot code review acts as an intelligent agent, reviewing your code from various angles—such as planning, customizing, and deduplicating—to systematically uncover insights, identify issues, and suggest fixes.
This article provides an overview of Copilot code review. For instructions on how to request a code review from Copilot, see Using GitHub Copilot code review.
New tools (public preview) in GitHub Copilot code review
Note
- The GitHub Pre-release License Terms apply to your use of this product.
- These tools are enabled automatically for GitHub Copilot Pro or GitHub Copilot Pro+ plans.
- If you get a Copilot subscription from an organization, you will only be able to participate in the public preview on the GitHub website if an owner of your organization or enterprise has enabled Copilot in GitHub.com > Opt in to preview features in the GitHub Copilot policies page of the organization or enterprise settings. See Managing policies and features for GitHub Copilot in your organization and Managing policies and features for GitHub Copilot in your enterprise.
Copilot code review has several new tools that are in public preview and subject to change.
- Full project context gathering to provide more specific, accurate, and contextually aware code reviews.
- Support for deterministic detections like CodeQL and security findings, to deliver more high-signal, consistent findings for security and quality.
- The ability to pass suggestions to Copilot coding agent, for automated creation of a new pull request against your branch with the suggested fixes applied.
You are not required to have code scanning and GitHub Actions enabled in your organization or enterprise to use the new tools in Copilot code review.
In the event that GitHub Actions is unavailable or if Actions workflows used by Copilot code review fail, reviews will still be generated but without the additional features provided by the new tools in Copilot code review.
Note
The public preview includes free actions minutes for the new tools in Copilot code review.
Usage charges will apply when the feature becomes generally available.
Availability
Copilot code review is supported in:
- GitHub.com
- GitHub Mobile
- VS Code
- Visual Studio
- Xcode
- JetBrains IDEs
Copilot code review is—with one exception—a premium feature, available with the Copilot Pro, Copilot Pro+, Copilot Business, and Copilot Enterprise plans. See Copilot plans.
The exception is the review of a selection of code within a file in Visual Studio Code. This is a standard feature available to all Copilot users in VS Code.
If you receive Copilot from an organization then, to be able to request a pull request review from Copilot on GitHub.com or in GitHub Mobile, the Copilot code review option must be enabled in the Copilot policy settings for the organization. See Managing policies and features for GitHub Copilot in your organization.
Code review monthly quota
Each time Copilot reviews a pull request, or reviews files in your IDE that contain changes, your monthly quota of Copilot premium requests is reduced by one. Code review for currently selected text in VS Code does not consume a premium request. For information about premium requests, see Requests in GitHub Copilot.
If a repository is configured to automatically request a code review from Copilot for all new pull requests, the premium request usage is applied to the quota of the pull request author. If a pull request is created by GitHub Actions or by a bot, the usage will apply to the user who triggered the workflow (if identifiable), or to a designated billing owner.
When you reach your monthly quota you will not be able to get a code review from Copilot until your quota resets—unless you upgrade your Copilot plan or enable additional premium requests.
Model usage
Copilot code review is a purpose-built product that uses a carefully tuned mix of models, prompts, and system behaviors to deliver consistent, high-quality feedback across a wide range of codebases. Model switching is not supported, as changing the model is likely to compromise reliability, user experience, and the quality of review comments.
Note
Copilot code review may use models that are not enabled on your organization's "Models" settings page. The "Models" settings page only controls Copilot Chat.
Since Copilot code review is generally available, all model usage will be subject to the generally available terms. See Managing policies and features for GitHub Copilot in your organization.
Copilot code review in Visual Studio Code
Copilot code review in Visual Studio Code supports two types of review:
- Review selection:
- Highlight code and ask for an initial review.
- Standard Copilot feature. No premium requests used.
 
- Review changes:
- Request a deeper review of all of your uncommitted changes.
- Premium feature. Uses one premium request from your monthly quota per review.
 
Providing instructions for Copilot code reviews
You can tailor the reviews that Copilot generates by providing custom instructions. This helps Copilot to review the code in a way that matches your team's coding standards, tools, and practices. See Adding repository custom instructions for GitHub Copilot and Adding organization custom instructions for GitHub Copilot.
Validating Copilot code reviews
Copilot isn't guaranteed to spot all problems or issues in a pull request, and sometimes it will make mistakes. Always validate Copilot's feedback carefully, and supplement Copilot's feedback with a human review.
For more information, see Responsible use of GitHub Copilot code review.
About automatic pull request reviews
By default, Copilot will only review a pull request if it's assigned to the pull request in the same way you would assign a human reviewer. However:
- Individual users on the Copilot Pro or Copilot Pro+ plan can configure Copilot to automatically review all pull requests they create.
- Repository owners can configure Copilot to automatically review all pull requests in the repository that are created by people with access to Copilot.
- Organization owners can configure Copilot to automatically review all pull requests in some or all of the repositories in the organization where the pull request is created by a Copilot user.
Triggering an automatic pull request review
The triggers for automatic code review depend on the configuration settings:
- Basic setting:
- When a pull request is created as an "Open" pull request.
- The first time a "Draft" pull request is switched to "Open".
 
- Review new pushes:
- Every time a new commit is pushed to the pull request.
 
- Review draft pull requests:
- Pull requests are automatically reviewed while they are still drafts—before being switched to "Open".
 
Note
Unless Copilot 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 Copilot to re-review the pull request, you can request this manually. To do this, click the button next to Copilot's name in the Reviewers menu.
Limits on automatic pull request reviews
Copilot code review is a premium feature with a per-person monthly quota. When Copilot carries out an automatic review, it uses one premium request from the quota of the user who created the pull request. For more information, see About GitHub Copilot code review.
Configuring automatic pull request reviews
For details of how to configure Copilot to automatically review new pull requests, see Configuring automatic code review by GitHub Copilot.
Getting detailed code quality feedback for your whole repository
GitHub Copilot code review reviews your code in pull requests and provides feedback. If you want to surface actionable feedback on the reliability and maintainability of your whole repository, enable GitHub Code Quality. See About GitHub Code Quality.