Research consistently shows that code review quality drops after 200-400 lines of changes. Large PRs get rubber-stamped. Small PRs get thoughtful feedback.
But nobody wants to create large PRs. It just... happens. And without visibility, nobody notices until the review is painful.
Make PR Size Visible
I just shipped pr-size-labeler — a GitHub Action that automatically labels every PR by its diff size.
- uses: ollieb89/pr-size-labeler@v1
One line. Every PR gets a label:
| Label | Lines Changed | Signal |
|---|---|---|
size/XS |
0-10 | Trivial — review in 2 minutes |
size/S |
11-50 | Quick — grab a coffee and review |
size/M |
51-200 | Moderate — block 15 minutes |
size/L |
201-500 | Large — schedule dedicated time |
size/XL |
501+ | Consider splitting this PR |
Smart Exclusions
The clever bit: lock files and generated code are excluded by default. A 5-line dependency bump shouldn't get an XL label because package-lock.json added 2000 lines.
Default exclusions:
-
package-lock.json,yarn.lock,pnpm-lock.yaml *.generated.*dist/**
Customize with:
- uses: ollieb89/pr-size-labeler@v1
with:
exclude-patterns: |
**/*.snap
docs/generated/**
The Toolkit
This is the third action in a growing toolkit:
- workflow-guardian — catches workflow security issues
- test-results-reporter — aggregates test results into PR comments
- pr-size-labeler — labels PRs by size
All free. All open source. All zero-config.
Building developer tools in public. Follow for more, or check the repos.
Top comments (0)