labeler: Error: found unexpected type for label 'xxx' (should be array of config options)
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.
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Reactions: 15
- Comments: 26 (6 by maintainers)
Commits related to this issue
- feat(labeler.yml)!: changes --emitLabeler to emit labeler@v5 format labeler.yml - BREAKING (#163) ## Description - changes the --emitLabeler output so it supports the labeler v5 format ## Moti... — committed to sverweij/virtual-code-owners by sverweij 7 months ago
- Fix labeleler (#1212) Upgrades `labeleler.yml` to v5 and fixes the breaking changes. Useful documentation for this PR: * https://github.com/actions/labeler/issues/712 * https://github.com/actions/la... — committed to SharezoneApp/sharezone-app by nilsreichardt 6 months ago
- chore(ci): labeler v5.0.0 is inconsistent Despite the fact that the labeler v5.0.0 demands a different syntax for the configuration file, it has inconsistent behavior: https://github.com/actions/lab... — committed to geyslan/tracee by geyslan 3 months ago
- chore(ci): labeler v5.0.0 is inconsistent (#3978) Despite the fact that the labeler v5.0.0 demands a different syntax for the configuration file, it has inconsistent behavior: https://github.com/... — committed to aquasecurity/tracee by geyslan 3 months ago
I missed the
checkout
action (https://github.com/scikit-rf/scikit-rf/blob/06190acd59d7be77e7907b45456ffecba66dfd1d/.github/workflows/PR_labeler.yml#L9) in our configuration yml file before, that’s why the old labeler.yml file was used all the time.This is visible through this line in the logs.
So I ended up deleting the whole workflow (https://github.com/scikit-rf/scikit-rf/pull/985), labeler still failed as there was no checkout task. After merging to master I re enabled the PR labeler from scratch (https://github.com/scikit-rf/scikit-rf/pull/986).
Oh, wow. I didn’t see that. That’s a significant change. Noted. 👍🏻