Reviewing a Pull Request on GitHub

Become the reviewer: check the code against the requirements in the Files changed tab, leave polite line comments, request changes and approve the PR after the author’s new commit.

About the product

Kadri, mentor

Hi! Last time your Pull Request went through a review. Today we switch roles: you are the reviewer. Marko from the development team has opened a PR with an order discount, and it needs checking. But first, four simple rules for comments.

Quick reference

Files changed

The PR tab that shows which files and lines have changed: green lines with + are added, red lines with − are removed. A review starts here.

What to check

Whether the code meets the task requirements (especially boundary values), clarity and readability: names, no debug output and no extra code.

Line comment

Hover over a line and a blue “+” appears. Click it, write a comment and click Add single comment. You can comment on as many lines as needed.

Review changes

The outcome of the review: an overall comment and a decision. Comment is feedback that neither approves nor blocks, Approve means it can be merged, Request changes means it must be fixed before merging. Sent with Submit review.

Tone of comments

A comment is about the code, not the author. Say what is wrong, explain why and suggest a fix. Being polite and specific saves time for both sides.

After Request changes

The author fixes the code in a separate commit to the same branch and pushes — the PR updates by itself. The reviewer checks the changes again and approves, and then the PR can be merged.