New configuration format for PR Labeler Action (V5)

26 views
Skip to first unread message

Jean-Marc Meessen

unread,
Dec 12, 2023, 9:50:12 AM12/12/23
to Jenkins Developers
Hello,

(sharing this to avoid others "investing" time to fix it)

The Pull Request Labeler GH action is often used in plugin projects to automatically label PR, based on certain patterns.

With the version 5 of that GitHub Action came a change in the configuration format stored in .github/labeler.yml The full documentation is at https://github.com/actions/labeler?tab=readme-ov-file#pull-request-labeler 

This used to work (obsolete syntax)
-------------------------------
chore:
- .github/**/*
- .gitignore
- .mvn/*
- .settings/*
- .gitpod.yml
- Jenkinsfile

documentation:
- CHANGELOG.md
- CONTRIBUTING.md
- README.md
-------------------------------

From V5 on, this syntax should be used 
-------------------------------
chore:
- changed-files:
  - any-glob-to-any-file: '.github/**/*'
  - any-glob-to-any-file: '.gitignore'
  - any-glob-to-any-file: '.mvn/*'
  - any-glob-to-any-file: '.settings/*'
  - any-glob-to-any-file: '.gitpod.yml'
  - any-glob-to-any-file: 'Jenkinsfile'
documentation:
- changed-files:
  - any-glob-to-any-file: 'CHANGELOG.md'
  - any-glob-to-any-file: 'CONTRIBUTING.md'
  - any-glob-to-any-file: 'README.md'
-------------------------------

/- Jmm

Verachten Bruno

unread,
Dec 12, 2023, 3:20:50 PM12/12/23
to jenkin...@googlegroups.com
Thanks a lot for this message, Jean-Marc, this has saved me a few hours of head-scratching.
Reply all
Reply to author
Forward
0 new messages