Skip to content

Error: found unexpected type for label 'xxx' (should be array of config options) #712

@HorizonNet

Description

@HorizonNet

Description:
After upgrading to v5.0.0 and changing the labeler configuration file matching to what is outlined in the documentation, I'm receiving the following error as soon as the action starts

Run actions/labeler@v5.0.0
The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api
Error: Error: found unexpected type for label 'terraform' (should be array of config options)
Error: found unexpected type for label 'terraform' (should be array of config options)

Action version:
5.0.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
After upgrading to 5.0.0 changed the labeler configuration to

terraform:
  - changed-files:
    - any-glob-to-any-file: terraform/**

which to me looks similar to the example from the documentation

Documentation:
- changed-files:
  - any-glob-to-any-file: docs/*

The workflow is defined as follows and used to work previously

---
name: Pull Request Labeler

on:
  pull_request_target:

jobs:
  triage:
    name: Label triage

    permissions:
      contents: read
      pull-requests: write

    runs-on: ubuntu-22.04

    steps:
      - uses: actions/labeler@v5.0.0
        with:
          sync-labels: true

Expected behavior:
The action should run successfully.

Actual behavior:
The action is failing with the error provided above.

Metadata

Metadata

Assignees

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