Description
actions/labeler@v7 fails to parse .github/labeler.yml and aborts the workflow before applying any labels:
Run actions/labeler@v7
The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api
Error: YAMLException: deficient indentation (24:7)
21 | "kind:build":
22 | - changed-files:
23 | - any-glob-to-any-file: [
24 | '.dockerignore',
------------^
25 | '.rat-excludes',
26 | '.scalafmt',
Root cause
The file uses YAML flow-style sequences ([ ... ]) split across multiple lines, with the continuation lines indented at 6 spaces while the opening bracket is at column 27. YAML 1.2 (and js-yaml@4, which actions/labeler@v7 depends on) requires flow-sequence continuations to be indented at least one column past the opening bracket, so every block in this file fails with the same error.
The format was introduced in commit 7e96dc7bc9 (Dec 19, 2023, #5874) when the action was bumped from v4 to v5. v5/v6 bundled an older js-yaml that did not strictly enforce the indentation rule, so the bug was latent until #7583 bumped the action to v7.
Proposal
Rewrite all any-glob-to-any-file: [ ... ] / all-globs-to-any-file: [ ... ] blocks in .github/labeler.yml as standard block-style sequences so the file parses under strict YAML 1.2 and remains compatible with actions/labeler@v7 (and future versions).
Description
actions/labeler@v7fails to parse.github/labeler.ymland aborts the workflow before applying any labels:Root cause
The file uses YAML flow-style sequences (
[ ... ]) split across multiple lines, with the continuation lines indented at 6 spaces while the opening bracket is at column 27. YAML 1.2 (andjs-yaml@4, whichactions/labeler@v7depends on) requires flow-sequence continuations to be indented at least one column past the opening bracket, so every block in this file fails with the same error.The format was introduced in commit
7e96dc7bc9(Dec 19, 2023, #5874) when the action was bumped from v4 to v5. v5/v6 bundled an olderjs-yamlthat did not strictly enforce the indentation rule, so the bug was latent until #7583 bumped the action to v7.Proposal
Rewrite all
any-glob-to-any-file: [ ... ]/all-globs-to-any-file: [ ... ]blocks in.github/labeler.ymlas standard block-style sequences so the file parses under strict YAML 1.2 and remains compatible withactions/labeler@v7(and future versions).