How I handle pull requests
These are the standards I apply to every pull request. The aim is a fast review and a history that is still readable a year later.
One change per PR
Each pull request covers a single change. If the description needs the word “and”, it is two PRs. Reviewers skim large diffs, and skimmed diffs are where defects get through. Smaller PRs also ship sooner, because each one merges as soon as it stands on its own.
A description the reviewer can act on
Every description answers three questions:
- What changed.
- Why it changed.
- How to verify it.
Where I weighed alternatives, I state the decision and the reason. That removes most follow-up questions.
Clean history
I rebase instead of merging and squash fix-up commits before review. Each commit is a meaningful step, so git log stays readable and git bisect works.
# Tidy the branch before review
git rebase -i main
git push --force-with-lease
I use --force-with-lease because it rejects the push if someone else has updated the branch.
Self-review first
I read the full diff in the PR view before requesting review. It catches stray logging, commented-out code and files committed by mistake, which is about half of what I would otherwise get flagged on.
Automate the routine checks
Formatting, linting, type checks and tests run in CI, and I only request review once they pass. Reviewer time goes on what automation cannot judge: whether this is the right change, and whether it is correct.
Urgent fixes can skip these steps. The rest of the time, they decide whether a PR merges in an hour or waits three days.