Sub topic 1
What Copilot Code Review Is and What It Is Not
Prerequisites
Assume you know basic Git and GitHub workflows, including branches, commits, and pull requests. You should also understand how human pull request reviews work.
What Copilot code review does
Copilot code review analyzes the changes in a pull request and posts review comments. It can identify possible bugs, security risks, missing tests, and unclear implementation choices. Its review is an automated second opinion based on the code and context available to it.
Copilot does not replace a required human approval. It may miss an important problem, misunderstand the application's requirements, or suggest a change that introduces a different problem. A human reviewer remains responsible for architectural decisions, product behavior, and final approval.
Plans, access, and enablement
Code review availability depends on your Copilot plan, organization settings, repository permissions, and GitHub's current feature rules. An organization administrator may need to enable the feature. If Copilot does not appear in the reviewer list, check your plan and ask an administrator to confirm repository access and policy settings.
Requesting a review on a pull request
- Open the pull request on GitHub.
- Open the Reviewers menu in the pull request sidebar.
- Select Copilot.
- Wait for Copilot to post a review with the Comment status.
Copilot reviews the pull request's current changes. Give the pull request a clear description and keep unrelated changes out of it so the feedback has useful context.
Reading Copilot's review comments
Read each comment against the surrounding code and the intended behavior. Reproduce the reported problem when possible. A comment is evidence to investigate, not an instruction to accept automatically.
Apply a suggestion only after checking its correctness, tests, performance, and security impact. Dismiss a suggestion when it does not apply, and record the reason when your team requires an audit trail.
Exercise
Why should a developer verify a Copilot suggestion before applying it?
Show answer
Copilot can misunderstand requirements or produce a change that causes a new bug, so the developer must check the suggestion against the code and intended behavior.