Skip to content

Releases: IanTerHaar/auto-labeler

Release list

v1.0.0

Choose a tag to compare

@IanTerHaar IanTerHaar released this 11 Aug 16:30
2f3689c

auto-labeler

A GitHub Action that applies labels to a pull request based on checked checkboxes in the PR body.

GitHub release
License: MIT

Usage

name: Autolabeler

on:
  pull_request_target:
    types: [opened, edited, reopened, synchronize]

permissions:
  pull-requests: write
  contents: read

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: IanTerHaar/auto-labeler@v<latest_version>
        with:
          labels: bug, chore, dependencies, documentation, feature, security
          # Optional: fail the workflow when no known label checkbox is selected
          fail_on_no_label: true

Replace <latest_version> with the latest release tag.

Inputs

Name Required Default Description
labels yes Comma-separated list of known labels the action is allowed to add or remove.
token no ${{ github.token }} Token used to read and update PR labels.
fail_on_no_label no false If set to true, the action fails the workflow when no known label checkboxes are selected in the PR description.

PR body format

The action scans the PR body for markdown task-list lines whose text matches one of the known labels (case-insensitive):

- [x] bug
- [ ] chore
- [x] feature

Only labels listed in the labels input are managed; any other checkboxes are ignored.

New Contributors

Full Changelog: https://github.com/IanTerHaar/auto-labeler/commits/v1.0.0