Skip to content
Latchkey

GitHub Actions actions/labeler Applies No Labels

actions/labeler runs but adds no labels, usually because the config file uses the old (pre-v5) shape, points at the wrong path, or the job lacks pull-requests: write.

What this error means

The labeler job succeeds but the pull request gets no labels. Logs show it loaded the config but matched nothing, or it errors that the resource is not accessible.

.github/labeler.yml
# v5 changed the config schema; old flat globs no longer match
docs:
  - docs/**            # pre-v5 shape - ignored by labeler@v5

Common causes

Config uses the pre-v5 format

labeler v5 replaced flat glob lists with a changed-files / any-glob-to-any-file structure. An old-style config loads but matches no files, so no labels apply.

Missing permission or wrong config path

The job needs pull-requests: write, and the action looks for .github/labeler.yml by default. A different path must be passed via configuration-path.

How to fix it

Use the v5 config schema

.github/labeler.yml
docs:
  - changed-files:
      - any-glob-to-any-file: 'docs/**'
frontend:
  - changed-files:
      - any-glob-to-any-file: 'frontend-analytics/**'

Grant permission and pin the config path

.github/workflows/labeler.yml
permissions:
  contents: read
  pull-requests: write
jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v5
        with:
          configuration-path: .github/labeler.yml

How to prevent it

  • Migrate labeler config to the v5 changed-files schema when upgrading.
  • Declare pull-requests: write for the labeler job.
  • Test label rules on a draft PR after config changes.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →