$ git pushPR #42PULL REQUEST #42 · ADD-PASSED → MAIN+ def passed(score):+ # 50 or more passes+ return score > 50+ return score >= 50+ def test_passed():+ assert passed(80)+ assert not passed(20)+ assert passed(50)1correctness2clarity3tests4security5performanceREVIEWCI CHECKSMAIN
Pull request: the diff, the lines the change addsLamps: red changes requested, amber running, green approved or passingBubbles: review comments, attached to the lines they are aboutAt the back: the author's laptop and the reviewer's laptop. In the middle: the pull request with its diff. On the right: the reviewer's checklist, the review and CI lamps, and the merge gate for the main branch. The reviewer's comments stick to the lines they are about; the author's update changes those lines and resolves them; an approval and green checks open the gate. The tests sit next to the function here to keep the picture small. Real projects usually keep tests in their own files, such as test_scores.py, and run them with pytest.

Opening a pull request

  1. You finish a change on its own branch and open a pull request (PR): a request to merge it into main, the shared code. The PR shows the diff, the lines you added (+), and starts the automated checks (CI).

The review

Responding

Approve and merge

What happens

;; step 1/10 · open-pr
PR #42  Add passed()
branch   add-passed  →  main
diff     the lines this change adds (+) or removes (-)
  + def passed(score):
  +     # 50 or more passes
  +     return score > 50
  + def test_passed():
  +     assert passed(80)
  +     assert not passed(20)
CI       tests run: 2 asserts pass

Which approvals and checks are required is a repository setting (on GitHub, a branch protection rule). Many teams require one approval; some require two, or a code owner. Google's guide is a rule of thumb, not a law: it says the right size is up to the reviewer's judgment. A PR that renames one thing across 500 files can be easy to review.