Skip to content

[CI] PR labeler (triage) fails after actions/labeler v7 bump: deficient indentation in labeler.yml #2413

Description

@weiqingy

Describe the bug

The Pull Request Labeler workflow (the triage check) fails on PRs whose run happens after #2410 was merged, with:

##[error]YAMLException: deficient indentation (27:7)

while parsing .github/labeler.yml. This blocks the triage check on affected PRs (for example #2409).

Root cause

#2410 bumped actions/labeler from v6 to v7. labeler v7 depends on js-yaml ^5.1.0, which is stricter about indentation of multi-line flow sequences than the version v6 used. The current .github/labeler.yml writes each label's globs as a multi-line flow sequence:

infra:
  - changed-files:
    - any-glob-to-any-file: [
        ".github/**",
        ".gitmodules"
      ]

js-yaml 5.x rejects the closing-bracket indentation here. This is reproducible locally: js-yaml 5.2.1 (the version labeler v7 resolves) throws the exact deficient indentation (27:7) on the current file, while js-yaml 4.3.0 parses it without complaint.

To Reproduce

  1. Open or re-run any PR after Bump actions/labeler from 6 to 7 #2410 merged.
  2. The Pull Request Labeler / triage check fails in a few seconds.

Expected behavior

The triage check passes and labels are applied.

Additional context

Fix: write the glob lists as block sequences (the style actions/labeler documents for v5+), which parses cleanly under js-yaml 5.x. This is the same class of change as #1842, which adapted the config for the v4 to v6 bump.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions