Day 5, 30 minutes · beginner
Why it matters
Copilot's pull request looks finished. It has a title, a description, a list of changed files and a tidy summary of what was done. That makes it tempting to merge after a quick glance. GitHub's own docs say the opposite: a Copilot pull request deserves the same thorough review as any other contribution. Copilot can write code that works but is wrong for your project, or code with a quiet mistake in it.
The good news is that you do not have to review alone. Copilot code review can read the pull request as a second pair of eyes and flag issues, and you can hand your own comments back to the cloud agent to fix. You stay the one who decides and the one who merges.
Today you review the cheese board pull request from lesson 4 like a colleague's: read it, test it, ask for a second opinion, send your fixes back in one batch and merge it yourself.
Your review comes first
Copilot code review is a helper, not the reviewer. Start with your own read, because you know things no reviewer can see in the code:
- Does it do what the issue asked? Go through the "Done when" lines one by one.
- Did it change anything it should not? The issue said no price in
cheeses.jsonmay change. The Files changed tab shows it. - Is the result right? You know the board prices: Starter 7.10, Smoky 6.80, Full house 14.10. Open the page and compare.
- Would you accept this from a person? Names, layout and structure should fit the rest of the site.
The session log is useful here too. It shows why Copilot made a change and which checks it ran, and every Copilot commit links to it.
Copilot code review as a second reader
On the pull request, you request a review from Copilot the same way you would from a person. GitHub says it usually takes less than 30 seconds. Copilot labels each comment High, Medium or Low, and often adds a suggested change you can apply with a couple of clicks.
Two things to know before you click:
- Pick the effort level. Lite looks for clear problems such as bugs, security issues and style slips. Balanced, the default, uses a stronger model for deeper analysis; Max is the most thorough. GitHub's rough guide per review is about 0.25 US dollars for Lite, 1.50 for Balanced and 10 for Max, paid from your AI credits, plus GitHub Actions minutes. For a small page, Lite is enough.
- It follows your instructions file. Copilot code review reads
.github/copilot-instructions.md, so the cheese rules from lesson 2 apply to the review too.
A Copilot review never counts as an approval by default. It leaves comments, not "Approve".
Sending fixes back to Copilot
You can mention @copilot in a comment on the pull request, and Copilot pushes new commits to the same branch. Copilot starts as soon as a comment is submitted, so one comment at a time means several small sessions. Use Start a review instead and submit all your comments together: Copilot then works on the whole review in one go. Only people with write access to the repository can direct Copilot this way.
You can also fix small things yourself: switch to the branch, change it and push. Copilot's pull request is a normal branch.
The steps
- Read the pull request and every changed line.
- Test it on your computer by switching to the branch and opening the page.
- Request a Copilot code review at the Lite level.
- Sort the comments. Not every comment needs a change. Decide per comment.
- Send your fixes as one batched review with
@copilotcomments. - Check the new commits and merge when every "Done when" line holds.
Follow the guide for GitHub Copilot below for the exact clicks.
No cloud agent or code review on your plan?
If you made the pull request yourself in lesson 4, do steps 1, 2, 4 and 6 on your own. That is the core of this lesson anyway. Fix what you find on the branch, push, and merge.
Example: Roos's review
Copilot's pull request added boards.html and one link in index.html. Roos checked the prices: all three right. Copilot code review left one Medium comment: the new table had no header row for screen readers. Roos added her own comment asking for the board names in bold, started a review with both points and submitted it. Copilot pushed one commit, she checked it and merged.
Common mistakes
- Merging on a good summary. The description says what Copilot meant to do, not that the page is right. In a repository with automated checks, a green tick only shows that the checks passed.
- Treating every review comment as an order. Copilot code review can be wrong or can repeat a comment you already dismissed.
- Single comments one by one. Each one starts a separate round of work for Copilot.
- Running workflows without reading them. By default, GitHub Actions workflows do not run on Copilot's pushes until you click Approve and run workflows. Read any change under
.github/workflows/first: workflows can reach your secrets.
Today's actions
Ticks are not saved without an accountDo it in GitHub Copilot
GitHub Copilot
- Open Copilot's pull request. Read the description, then open the Files changed tab and read every changed line.
- Check it on your computer. Replace BRANCH with the branch name shown at the top of the pull request, then open boards.html in your browser and compare the prices with the lesson text.
git fetch origin git switch BRANCH - Under Reviewers in the right sidebar, choose the review effort Lite next to Copilot if the choice is shown. Then click Request next to Copilot.
- Wait for Copilot's review and read its comments. Each one is labelled High, Medium or Low. Decide for each one: fix, ignore or ask.
- In Files changed, write your own comments on the lines that need work. Start each one with
@copilotand click Start a review for the first one, so all comments go to Copilot at once when you submit the review. - When Copilot has pushed its fixes to the pull request, check the changed lines and the prices once more. Then merge the pull request yourself.
- Bring your computer up to date with the merged work.
git switch main git pull
Note: Copilot's review is a Comment review by default, so by default it does not approve a pull request. Where a repository requires approvals, your approval of a Copilot pull request does not count: another reviewer has to approve. A review comment from Copilot code review can also be handed to the cloud agent with Fix with Copilot.
Paid planCopilot code review on pull requests is in Copilot Student, Pro, Pro+, Max, Business and Enterprise. Copilot Free has only Review selection in VS Code.
Create a free account to save your progress
Free, and no payment details. Your ticks and finished lessons are kept, on every device.
Create a free account I already have an accountCreate a free account to save your progress. Sign in or sign up