GitHub Copilot can now review your code directly in VS Code, providing immediate feedback on uncommitted changes. It even adds comments similar to the feedback in a pull request! This local review capability allows developers to catch issues before they even reach version control, improving code quality from the start. And maybe catch those embarrassing typos!
Prerequisites
Before you can use GitHub Copilot for code reviews, you will need to have the following setup:
- A GitHub account. (sign up for free at github.com)
- An active GitHub Copilot subscription (Individual, Business, or Enterprise).
- VS Code installed or Visual Studio 2022 17.6 or later installed.
- GitHub Copilot installed
Refer to my previous blog Getting started with GitHub Copilot in VS Code if you have not setup GitHub Copilot already.
Code reviews with GitHub Copilot
In VS Code, after you have made changes to files in a source controlled repository, open the source control panel and ensure there are uncommitted changes.
Hover over the Changes section to show various icons. Click on the 'Code Review' button and wait a moment.
Copilot will review your changes and add comments.
When you are satisfied with your changes, you can go ahead with the normal staging, commit and push to git process.
Additonal resources
Comments
Post a Comment