Skip to content

MokkeMeguru/pr-labeler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b45895f · Nov 18, 2022

History

34 Commits
Mar 23, 2021
Mar 23, 2021
Dec 23, 2021
Feb 26, 2021
Oct 14, 2021
Feb 26, 2021
Mar 23, 2021
Oct 14, 2021
Feb 25, 2021
Mar 23, 2021
Mar 23, 2021
Mar 1, 2021
Nov 18, 2022
Oct 14, 2021
Mar 23, 2021

Repository files navigation


Logo

pr-labeler

Add label to the pull request depending on the number of changes and the files excluded from the counting

Table of Contents

Usage

You can create a .github/workflows/pr-labeler.yml file:

name: pr-labeler

on: [pull_request]

jobs:
  pr-labeler:
    runs-on: ubuntu-latest
    name: Label the PR size
    steps:
      - uses: coverwallet/[email protected]
        with:
          xs_max_size: '10'
          s_max_size: '100'
          m_max_size: '500'
          l_max_size: '1000'
          exclude_files: '.txt'
    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Inputs

Name Description Required
xs_max_size The maximum number of lines changed for the label named xs true
s_max_size The maximum number of lines changed for the label named s true
m_max_size The maximum number of lines changed for the label named m true
l_max_size The maximum number of lines changed for the label named l true
exclude_files The regular expression of the type of file or files that we want to exclude from the counting of changes true

Assumptions

  • PR size labeler consider as a change any kind of line addition, deletion, or modification
  • A PR will be labeled as xl if it exceeds the amount of changes defined as l_max_size

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published