Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages