MaksimZhukov
released this
20 Sep 11:55
·
132 commits
to v5.0.0-beta
since this release
What's Changed
In scope of this beta release, the structure of the configuration file (.github/labeler.yml
) was changed from
LabelName:
- any:
- changed-files: ['list', 'of', 'globs']
- base-branch: ['list', 'of', 'regexps']
- head-branch: ['list', 'of', 'regexps']
- all:
- changed-files: ['list', 'of', 'globs']
- base-branch: ['list', 'of', 'regexps']
- head-branch: ['list', 'of', 'regexps']
to
LabelName:
- any:
- changed-files:
- AnyGlobToAnyFile: ['list', 'of', 'globs']
- AnyGlobToAllFiles: ['list', 'of', 'globs']
- AllGlobsToAnyFile: ['list', 'of', 'globs']
- AllGlobsToAllFiles: ['list', 'of', 'globs']
- base-branch: ['list', 'of', 'regexps']
- head-branch: ['list', 'of', 'regexps']
- all:
- changed-files:
- AnyGlobToAnyFile: ['list', 'of', 'globs']
- AnyGlobToAllFiles: ['list', 'of', 'globs']
- AllGlobsToAnyFile: ['list', 'of', 'globs']
- AllGlobsToAllFiles: ['list', 'of', 'globs']
- base-branch: ['list', 'of', 'regexps']
- head-branch: ['list', 'of', 'regexps']
This is a beta version and we would appreciate it if you could provide us with your feedback. If you have any questions, ideas or concerns, please share them in the corresponding issue.
Details
In the implementation of the alpha version there were two options for changed-files:
any
(ANY glob must match against ANY changed file) andall
(ALL globs must match against ALL changed files).
In scope of this PR, we expanded this functionality and provided the following combinations:
AnyGlobToAnyFile
- ANY glob must match against ANY changed fileAllGlobsToAnyFile
- ALL globs must match against ANY changed fileAnyGlobToAllFiles
- ANY glob must match against ALL changed filesAllGlobsToAllFiles
- ALL globs must match against ALL changed files
How do the any
and all
top-level keys work?
Top-level keys (any
and all
) bind options (changed-files
, base-branch
, head-branch
) in the following ways:
all
: all of the provided options (changed-files
,base-branch
, etc.), glob combinations (AnyGlobToAnyFile
,AllGlobsToAnyFile
, etc.) and regexps must match for the label to be applied.any
: any of the provided options (changed-files
,base-branch
, etc.), glob combinations (AnyGlobToAnyFile
,AllGlobsToAnyFile
, etc.) and regexps must match for the label to be applied.
If an option is specified without a top-level key, it will default to any.
Usage example:
# Add the `frontend` label to any change to any *.js files as long as the `main.js` hasn't been changed and the PR is open against the `main` branch
frontend:
- all:
- changed-files:
- AnyGlobToAnyFile: ['src/**/*.js']
- AllGlobsToAllFiles: ['!src/main.js']
- base-branch: 'main'
Full Changelog: v5.0.0-alpha.1...v5.0.0-beta.1