Skip to content

Applies labels to Pull Requests based on the total lines of code changed.

License

Notifications You must be signed in to change notification settings

balancefriends/pull-request-size

 
 

Repository files navigation

Pull Request Size drawing

License: MIT Sentry Build Status codecov Dependabot

Pull Request Size is a GitHub App that applies size/* labels to Pull Requests based on the total lines of code changed (additions and deletions).

screen shot 2018-11-01 at 10 42 27 am

Install

👉 Install via GitHub marketplace 🌟

This app is free to use for personal and public organization repos. There is a paid plan for use with private organization repos.

Sizing

Name Description
size/XS Denotes a PR that changes 0-9 lines.
size/S Denotes a PR that changes 10-29 lines.
size/M Denotes a PR that changes 30-99 lines.
size/L Denotes a PR that changes 100-499 lines.
size/XL Denotes a PR that changes 500-999 lines.
size/XXL Denotes a PR that changes 1000+ lines.

Pull Request Size calculates the size of a PR as

total additions + total deletions - (all generated¹ file additions/deletions)

¹ A generated file is either one of the standard generated files as defined in noqcks/generated or defined with linguist-generated=true in a .gitattributes file.

Configuration

This app requires no configuration out of the box. However, you can exclude certain files from being counted towards a PR's size, and you can add custom labels in Github.

Excluding Files

If you have files that you would not like to be included in the calculation for a Pull Request's size, you can modify the .gitattributes file with the flag linguist-generated=true on your file or file pattern.

For example to mark all .meta files as generated, add this line to .gitattributes

*.meta linguist-generated=true

A .gitattributes file uses the same rules for matching as .gitignore files. See GitHub documenation on the linguist-generated flag for more info.

Custom Labels

You can set custom label names and colors by checking in the file .github/labels.yml to every repository you'd like to customize

XS:
  name: size/XS
  lines: 0
  color: 3CBF00
S:
  name: size/S
  lines: 10
  color: 5D9801
M:
  name: size/M
  lines: 30
  color: 7F7203
L:
  name: size/L
  lines: 100
  color: A14C05
XL:
  name: size/XL
  lines: 500
  color: C32607
XXL:
  name: size/XXL
  lines: 1000
  color: E50009

Feedback, suggestions and bug reports

Please create an issue here: https://github.com/noqcks/pull-request-size/issues

License

MIT © 2022 Benji Visser [email protected]

About

Applies labels to Pull Requests based on the total lines of code changed.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.9%
  • Shell 0.1%