A lightweight GitHub Actions workflow that automatically labels Pull Requests by size.
| Label | Lines Changed |
|---|---|
size/XS |
< 10 |
size/S |
< 30 |
size/M |
< 100 |
size/L |
< 500 |
size/XL |
< 1000 |
size/XXL |
>= 1000 |
Copy .github/workflows/pr-size.yml into your repo. That's it.
The workflow triggers on pull_request: [opened, synchronize] and uses only the built-in gh CLI no third-party actions needed.
- Fetches additions + deletions via
gh pr view - Picks a label based on total changed lines
- Creates the label if it doesn't exist (with color)
- Removes any previous
size/*label - Applies the new one