Skip to content
Latchkey

actions/labeler

Automatically label pull requests based on the files they change.

Official actionCategory: Pull Request AutomationLatest v5View on GitHub

What it does

actions/labeler reads path rules from .github/labeler.yml and adds matching labels to a pull request, so triage is automatic.

v5 changed the configuration format; check the README when upgrading from v4.

Usage

workflow (.yml)
on: [pull_request_target]
permissions:
  contents: read
  pull-requests: write
jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v5

Inputs

InputDescriptionDefaultRequired
repo-tokenToken used to set labels.GITHUB_TOKENNo
configuration-pathPath to the labeler config..github/labeler.ymlNo
sync-labelsRemove labels that no longer match.falseNo

Notes

Needs pull-requests: write. The config format changed in v5.

Common errors

  • No labels applied after upgrading to v5 usually means the labeler.yml is still in the v4 format.
  • Resource not accessible by integration means the job lacks pull-requests: write.

Security and pinning

  • On pull_request_target, be careful running untrusted code; labeler itself only needs the config and token.

Alternatives and related

Frequently asked questions

Where do I configure which labels apply?
In .github/labeler.yml, mapping label names to path globs. The v5 format differs from v4.

References

Running actions/labeler? Run it on Latchkey managed runners - self-healing and caching included. Start free → 30-day trial · No credit card