Skip to content
GitHub action to assign labels based on pull request change sizes
JavaScript Dockerfile
Use this GitHub Action with your project

Add this Action to an existing workflow or create a new one.

View on Marketplace
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.dockerignore
.eslintrc.json
.gitignore
Dockerfile
LICENSE
README.md
action.yml
index.js
package.json
test.js
yarn.lock

README.md

size-label-action

GitHub action to assign labels based on pull request change sizes.

Labels are taken from https://github.com/kubernetes/kubernetes/labels?q=size

Usage

Create a .github/workflows/size-label.yml file:

name: size-label
on: pull_request
jobs:
  size-label:
    runs-on: ubuntu-latest
    steps:
      - name: size-label
        uses: "pascalgn/size-label-action@ee2c1d869559066f4c5242f20c658e402e937e73"
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

Configuration

The following environment variables are supported:

  • IGNORED: A list of glob expressions separated by newlines. Files matching these expressions will not count when calculating the change size of the pull request. Lines starting with # are ignored and files matching lines starting with ! are always included.

You can configure the environment variables in the workflow file like this:

        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
          IGNORED: ".*\n!.gitignore\nyarn.lock\ngenerated/**"

License

MIT

You can’t perform that action at this time.