Skip to content

HttpError: You do not have permission to create labels on this repository #870

Closed
@matejchalk

Description

@matejchalk

Description:
The labeler action has just started failing with:

HttpError: You do not have permission to create labels on this repository.: {"resource":"Repository","field":"label","code":"unauthorized"}

Up until just now (May 14, 2025), the following workflow was working fine (see runs):

name: PR Labeler

on:
  pull_request_target:
    types: [opened, synchronize]

jobs:
  label:
    name: Add PR labels
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
    steps:
      - name: Checkout the repository
        uses: actions/checkout@v4
      - uses: actions/labeler@v5
        with:
          repo-token: '${{ secrets.GITHUB_TOKEN }}'
          sync-labels: true

Action version:

v5

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:

See PR code-pushup/cli#1006 with failing workflow.

Expected behavior:

Action should have permission to create labels, since the built-in GITHUB_TOKEN secret is being used and pull-requests: write permissions are configured.

Actual behavior:

Workflow fails with permissions error:

Image

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions