Skip to content

PRs Size Labeler

Actions
Sample GitHub Action to label a PR based on the amount of changes written in Go
v1.0
Latest
Star (3)

Pull Request Size Labeler

Sample GitHub Action written in Go to visualize and optionally limit the size of your pull requests.

Developed for fun and learn. Heavily inspired on codelytv/pr-size-labeler.

All credits for the original authors™

Status GitHub go.mod Go version Version Go Report Card Total alerts FriendsOfGo

Usage

Create a file named labeler.yml inside the .github/workflows directory and paste:

name: labeler

on: [pull_request]

jobs:
  labeler:
    runs-on: ubuntu-latest
    name: Label the PR size
    steps:
      - uses: friendsofgo/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          xs_max_size: '10'
          s_max_size: '100'
          m_max_size: '500'
          l_max_size: '1000'
          fail_if_xl: 'false'
          message_if_xl: 'This PR is so big! Please, split it 😊'

If you want, you can customize all *_max_size with the size that fits in your project.

By setting fail_if_xl to 'true' you'll make fail all pull requests bigger than l_max_size.

PRs Size Labeler is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Sample GitHub Action to label a PR based on the amount of changes written in Go
v1.0
Latest

PRs Size Labeler is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.