Skip to content

UnicornGlobal/pr-size-labels

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Usage

Create a file named size_labels.yml inside the .gihub/workflows directory and paste:

name: PR Size Labels

on:
  pull_request:

jobs:
  labels:
    runs-on: ubuntu-latest
    name: Label the PR size
    steps:
      - uses: UnicornGlobal/pr-size-labels@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Configuration

The labels get applied accordingly

Label Changes
size/XS 0-9
size/S 10-39
size/M 30-99
size/L 100-499
size/XL 500-999
size/XXL 1000+

Why the Fork?

Upstream project: CodelyTV/pr-size-labeler

We needed the following modifications:

  • made the sizes and names of the labels match our existing internal setup
  • check if a label exists already and exit if it does
  • remove any existing labels when the size of the PR changes
  • exclude the following lock files from change counts so that PRs with dependency updates can be assessed correctly
    • package-lock.json
    • yarn.lock
    • composer.lock

License

MIT

About

Display PR Size Labels

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 95.6%
  • Dockerfile 4.4%