๐Ÿ” Review STEP 07 / 15 โฑ 15 min โณ 115 min left

REVIEW: Copilot Code Review

7.1 โ€” Enable Copilot Code Review settings

First, head over to github.com, open your repository and check the Copilot Code Review settings.

  1. Repository Settings โ†’ Copilot โ†’ Code review
  2. Enable the following:
    • Use custom instructions when reviewing pull requests โ†’ On

Copilot Code Review settings page

7.2 โ€” Create a Ruleset for automatic review

On the same page, in the Manage Copilot code review automations section, just click Create ruleset for default branch. That's it โ€” Copilot Code Review will now fire automatically on every PR targeting the default branch (main).

Once that's set, head back to Step 6.4 and wait for Copilot to finish implementing.

7.3 โ€” Check the results on Copilot's PR

When Copilot finishes implementing in Step 6.4, it opens a PR automatically. The Ruleset you created in 7.2 fires the moment that PR opens, kicking off Copilot Code Review (โฑ about 5 minutes):

  • โœ… Pull Request Overview โ€” a summary comment for the whole PR
  • โœ… Code suggestions โ€” concrete change proposals on individual files

7.4 โ€” Apply the review suggestions

There are two ways to apply Copilot's review suggestions:

  1. Commit suggestion โ€” commit individual suggestions one at a time
  2. Fix batch with Copilot โ€” fix all suggestions in one go (recommended)

Clicking Fix batch with Copilot automatically opens a new PR with the fixes (โฑ about 15 minutes).

  1. First, merge the new PR with the fixes
  2. Then, merge the original PR