Copilot Integration on Pull Requests
Copilot Integration on Pull Requests¶
The Copilot bot in GitHub can augment your development workflow by providing code reviews to your pull requests before a human reviewer does. This can help catch issues early, improve the quality of your code, and help the human reviewer focus on more complex aspects of the code changes.
Pre-requisites¶
Before using GitHub Copilot on pull requests, ensure you have the following pre-requisites:
- GitHub Copilot enabled for your account, your organization and in your repository.
Copilot Bot on Pull Requests¶
The Copilot bot can be configured to run upon creation of your pull requests. Once it runs, the bot will provide comments on the pull request with suggestions and feedback on your code changes.
To enable the Copilot bot on pull requests, follow these steps:
- Go to your repository on GitHub.
- Click on the Settings tab.
- In the left sidebar, click on Rulesets.
- Select the branch you want to enable Copilot code review.
- Under the Branch Rulesets, check the box for Require a pull request before merging.
- Under the Require a pull request before merging section, check the box for Request pull request review from Copilot.

Note: If the author doesn't have a license to GitHub Copilot, the Copilot bot will not automatically be added to the pull request. Developers with access to Copilot can add the Copilot bot manually by clicking on the Add reviewers button and selecting the Copilot bot.
Copilot Bot Comments¶
Once the Copilot bot runs on your pull request, it will analyze the code changes and provide comments. The comments may include but are not limited to:
- Suggestions for code improvements
- General feedback on code structure and readability
- Security vulnerabilities or concerns
- Compliance with coding standards
You can view the comments in the Conversation tab of your pull request. The comments will be grouped under the Copilot bot's name, making it easy to distinguish them from other reviewers' comments.
Note that any comments you add to Copilot's review comments will be visible to humans, but they won't be visible to Copilot, and Copilot won't reply.