Tinkerer

Code and Climate Change. Blog about software development in ClimateTech RSS Icon


How I Review Pull Requests

I’ve written quite a bit about pull requests before - covering everything from how thoroughly you should review a pull request to strategies for avoiding being blocked by waiting for reviews and making your PR faster to review. This post builds on those, focusing specifically on what I do when reviewing PRs.

I spend a fair amount of time reviewing code, and I’d like to think I’m both reasonably fast and thorough. Over time, I’ve developed some habits, that I think make this more efficient. Not all of these habits might be relevant for everyone - we’re all wired differently in our brains.

I also recommend checking out Google’s Engineering Practices, which provides a short, pragmatic take on code reviews.

Read the PR Description First

The first thing I do when reviewing a PR is read the description. A good description should explain what is being changed and, more importantly, why. If I don’t understand the intent behind a PR, I can’t judge whether it’s the right change to make.

A test I often use: if I revisit this PR in six months, will the git history tell me what I need to know? I prefer all relevant context to be included directly in the PR description rather than relying on external issue trackers like Linear, Jira, or GitHub issues. Git logs don’t decay over time, but if your company changes issue tracker - good luck finding out why the changes described in JIRA-3481 were made.

If the PR description isn’t clear or doesn’t justify the change, that’s my first point of feedback. I also often check whether the code aligns with the description, and provide feedback on that.

Keep a Notepad

While reviewing, I almost always have somewhere to jot down thoughts and questions—things like:

Mostly I keep these as a list in a separate text file. This helps because questions you think of, often aren’t answered until later in the PR. Writing them down means you don’t have to worry you’ll forget them.

Once I finish reviewing, any unresolved notes become comments for the author—ranging from clarifying questions to suggestions for improvement.

Some PRs Are Quick to Review

Not all PRs require deep scrutiny. Some are quick to review, especially if they involve:

When a PR is well-scoped and self-contained, it can sometimes be reviewed in minutes.

Some PRs Need to Be Split Up

PR review time scales exponentially with size. If a PR contains multiple unrelated changes, I have to manually untangle their interactions, which takes significantly more time. I often request that PRs be split, especially if they mix refactoring with feature work or if they are difficult to review in a single pass.

Spending the time as an author to split up a PR, can improve the overall time to ship, because the time you spend is often less than the extra time it would take your reviewer to review the larger PR.

Pay Extra Attention to Module Boundaries

Code generally have parts that are public, and parts that are internal. You can consider the public part the “module boundaries”: The parts where the module interacts with the outside world.
The module boundaries could be an end-user-facing HTTP API, or simply the methods your particular module exposes for other code to interact with.
Often, getting the module boundaries right is more important than getting the internal details perfect. If a module boundary is well-designed and its implementation is properly tested at the level of the module boundary, it is often easy to refactor the internals later if needed.

When reviewing module boundaries, I pay particular attention to:

Evaluate the Author & Module Match

The level of scrutiny I apply depends on both who wrote the PR and which module it touches.

Based on the author, I also decide when to insist on cleanup now vs. later:
Some developers follow through on “I’ll clean this up in a later PR,” while others don’t.
For developers that reliably perform the follow-up, I’m generally pretty lenient about when cleanup appears, and for others, I normally insist on cleanup work being done in the same PR.

Finding the Important Changes

Many PRs contain a mix of boilerplate updates and tricky changes. I generally start by skimming over the files and marking the boilerplate or irrelevant files as “viewed” so I can focus on the core modifications. If the author has left comments guiding the review, that’s always helpful.

Then I either start looking at the module boundaries or the tests for the given code, to get an idea of how the feature is used, before jumping into the implementation - but this is very much based on gut-feeling.

For complex PRs, I sometimes pull the code locally to explore it in an editor, but not that often.

Things I Look for When Reviewing Production Code

Some issues are easy to spot with a fresh set of eyes—like leftover debug logs or unclear method names. Others require deeper thought. I generally focus on:

Things I Look for When Reviewing Test Code

I generally pay less attention to test code than production code. My main checks are:

If the tests cover the key scenarios I was curious about, I make a point to mention it, so reviews don’t always feel like a list of negatives.

Approve with Suggestions

In many cases, I like to “Approve with suggestions”, or as Google calls it a LGTM with comments.
That essentially means that I trust the author to correct the issues I pointed out. However, this depends on the fixes required, and my trust in the author to get them right without an additional review.

Did you enjoy this post? Please share it!