Skip to content

A GitHub Action for checking Pull Request's size

License

Notifications You must be signed in to change notification settings

kkohtaka/gh-actions-pr-size

Repository files navigation

GitHub Action PR Size

codecov

A GitHub Action for checking Pull Request's size

Usage

Add the following GitHub workflow to your repository.

name: PR size check
on:
  pull_request:
    types:
      - opened
      - edited
      - synchronize
      - labeled
      - unlabeled
jobs:
  check_pr_size:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - uses: kkohtaka/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Then, the following labels will be put on your Pull Requests depending on the size of them.

Label # of changed lines
size/XS 1 - 10
size/S 11 - 30
size/M 31 - 100
size/L 101 - 500
size/XL 501 - 1000
size/XXL 1001 -

License

MIT License

Copyright (c) 2020 Kazumasa Kohtaka [email protected]