Code review

Pull request size

Also known as PR size, Change size

By WeavePublished 1 min read

Definition

Pull request size describes the amount of change contained in a pull request. Tools may count added and deleted lines, changed files, commits, or a combination, so a size report should state its unit.

Size is a review-scope signal

Reviewers have a limited ability to hold a large change in context. A smaller request can make intent easier to explain and errors easier to find. That does not mean every change should be split mechanically.

An illustrative migration touches 80 files because a shared interface changed. Reducing it to several arbitrary pull requests may make the dependency harder to understand. The right split follows a coherent, testable unit of behavior.

Count more than lines when useful

Added and deleted lines can describe one aspect of scope. Changed files, logical commits, generated content, and the number of behaviors affected can add context. Keep generated code and formatting-only changes visible so they do not distort a comparison.

Avoid a target that changes behavior

If a team rewards tiny pull requests, authors may hide related changes in follow-up requests or avoid necessary refactors. If it rewards large batches, reviewers may approve without enough attention.

Use size with review time, rework, defects, and developer feedback. The aim is a change that can be understood and validated at a reasonable cost, not a particular line count.

How this relates to Weave

Weave's review and output views help teams examine change scope alongside review rounds and quality outcomes. Use size as a prompt to inspect reviewability, not as an individual quota. A large refactor and a small security fix need different forms of attention.

Explore Engineering intelligence

Sources and further reading

  1. Pull requests, GitHub Docs