You are asked to review a 2,000-line GitHub pull request. How do you review it effectively?
answer
- Say what you can honestly cover
- Intent first, implementation second
- Slice the diff instead of scrolling it
- One submitted review, not forty pings
- Rank findings by cost, not by line order
basics
~20 sSay what you can honestly review and push back on the size. Then work systematically: read the description and tests first, review commit by commit, use the file filter and viewed checkboxes, hide whitespace, and batch findings into one review separating blocking issues from notes.
solid answer
~50 sStart by being honest: attention degrades sharply past a few hundred lines, so a rubber-stamp on 2,000 is worse than declining. Ask whether it can be split, and if it cannot — a generated file, a mechanical rename, a vendored dependency — say which parts you reviewed properly. Then work the tools. Read the **description and the tests** first to learn the intended behaviour. Review **commit by commit** if the history is coherent; GitHub's per-commit diff view turns one wall into a sequence of intentions. Use the **file filter** to separate mechanical churn from real logic, **hide whitespace changes** so a reformat does not drown the diff, and tick **Viewed** on each file so you can leave and return. Batch everything into **one submitted review**, mark clearly what is blocking versus a nit, and pull the architectural objection to the top where the author will read it before fixing forty small things.
go deeper
Know the tools that make a big diff tractable: per-commit view, hide whitespace, file filter, viewed checkboxes, and batching comments into one review rather than posting each immediately.
Explain a repeatable order — description, tests, then implementation — and be able to say which classes of issue deserve human attention versus which belong to automation.
Show that you manage the situation as well as the diff: negotiate a split, scope your review honestly when you cannot cover everything, surface the one blocking issue first, and pick a verdict you can defend.
Own the systemic angle: recurring 2,000-line pull requests are a delivery-process signal. Address decomposition, incremental release and branch lifetime, and keep the fix out of the review comments themselves.
## Start with the honest conversation Review quality falls off a cliff with size. A 2,000-line pull request will get a real reading of the first two hundred lines and a scroll for the rest, and everyone involved knows it. The first professional move is therefore to ask whether it can be split — and to make that ask specific rather than moralising: "the schema migration and the API change could land separately, and I could review each properly today" beats "PRs should be smaller". Sometimes the answer is genuinely no. A dependency bump touching a lockfile, a mechanical rename across a package, a generated client, a vendored library: these are large and unsplittable. In that case scope the review explicitly and say so in the review body — "I reviewed the hand-written changes in `api/` and `service/`; the generated client I spot-checked only" — because a review that silently implies full coverage is a false signal that outlives you. ## Establish intent before reading code Read the pull request description and the linked issue. If the description does not say what the change is for, ask before reviewing; you cannot judge whether code is correct without knowing what correct means. Then read the **tests first**. Tests state the intended behaviour in executable form, they show which cases the author considered, and their absence in a region is itself the finding. Starting in the tests also stops you from anchoring on implementation details before you know what the change is trying to do. ## Use the mechanics GitHub gives you **Commit by commit.** If the author curated the history — refactor, then behaviour change, then tests — the per-commit view converts one enormous diff into a sequence of small, intentional ones. If the history is thirty "wip" commits, this does not help, and that is worth saying kindly. **Hide whitespace changes.** A reformat mixed into a logic change is the classic hider; toggling whitespace off collapses it and leaves the real edit visible. **File filter.** Filter by extension or path to sweep mechanical changes in a batch — lockfiles, generated code, imports — so your attention is spent on the files where a defect can actually hide. **Viewed checkboxes.** Ticking each file as you finish lets you review across several sittings without losing your place, and GitHub re-opens a file if it changes after you marked it. **Batch, do not spray.** Start a review so comments stay pending, and submit once. Forty individual notifications is a hostile experience, and batching lets you delete the three comments that the last file answered. ## Prioritise what you look for With limited attention, spend it in order of what humans catch that tools do not: correctness on the edges (nulls, empty collections, boundaries, error paths), concurrency and ordering, security-relevant handling of input and authorization, data migration and rollback, and public interfaces that will be expensive to change later. Formatting, import order and lint rules should be automated; commenting on them by hand in a large review is spending your scarcest resource on the cheapest problem. ## Structure the output One review, and inside it a clear hierarchy. Put the one thing that matters — the design objection, the missing rollback, the unhandled failure mode — at the top of the review body, not on line 1,340 of file 27 where it will be found last. Label the rest: prefix optional remarks with something the team has agreed on (many use "nit:") so the author can triage in one pass instead of guessing which of your forty comments block the merge. Use suggestions for the mechanical fixes so the author clicks rather than parses prose. Ask questions where you are unsure rather than asserting; on a large change you are frequently the one missing context, and "what happens when this is empty?" costs nothing when the answer is "the caller guarantees it isn't". ## Choose a verdict you can defend If the approach is wrong, request changes early and say so before the author invests another week. If the code is sound with small issues, approve and mark which comments are optional — holding an approval hostage to nits is how review becomes a chokepoint. And if you could not review it properly, say that instead of approving; an unreviewed merge with your name on it is the worst outcome available. ## The systemic point A 2,000-line pull request is usually a symptom: no incremental delivery path, a branch that lived too long, or a feature that was never decomposed. Reviewing it well is the immediate job; raising the pattern afterwards — in retrospective, not in the review comments — is the durable fix.
- How do you push back on pull request size without sounding obstructive?Make it concrete and offer something. Name the seam — "the migration and the endpoint could land separately" — and pair it with a commitment: "I can review each within the day". That reframes it as faster feedback rather than a rule being enforced. When splitting is genuinely impossible, drop the ask and instead scope your review explicitly so nobody mistakes partial coverage for full coverage.
- Why read the tests before the implementation in a large diff?Tests state intended behaviour in executable form, reveal which cases the author considered, and make their own gaps visible. Starting there gives you a specification to judge the implementation against instead of anchoring on how it was written. A large change with thin tests is itself the headline finding, and you learn that in five minutes rather than after two hours of reading.
- When should you decline to review a pull request at all?When you cannot give it a reading that means anything — no context on the subsystem, or a volume you know you will skim. Say so and hand it to someone who can, or ask for a split. An approval is a claim that a competent person looked; issuing that claim without doing the work removes the only safety property review provides, and does so invisibly.
saying these in an interview costs you the question
- Approves a huge diff after a quick scroll
- Leaves forty separate immediate comments
- Spends the review on formatting nits
- Buries the design objection deep in the files
- Blocks merge over optional preferences