You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Issue of the label configuration file ".github/labeler.yml" #101
Ok, I have found what is the culprit there. The meaning of any and all is poorly defined. The issue there is that
- any: ['./*', './src/*']
and
- ./*
- ./src/*
Have different meaning. The list in any mean that any file in the PR must match all globs in the list. With all it mean that all files in the PR must match all globs in the list. So to have the same behaviour with any you need to use:
Have different meaning. The list in any mean that any file in the PR must match all globs in the list. With all it mean that all files in the PR must match all globs in the list. So to have the same behaviour with any you need to use.
@mittalyashu assume that you have such definition any: ['src/*', '*/test/*']. Then it will apply the tag if any of the files matches all globs. So for example if your PR changes files:
examples/foo
src/test/foo
Then it will apply, as src/test/foo matches both of the globs. However if list of files would look like:
examples/test/foo
Then it will not match, because while */test/* matches, the src/* doesn't, so whole filter fails.
Hello everyone!
We have released a new major version of the action. The behaviour of the any selector was changed to match ANY file against ANY glob pattern so it became more intuitive. Please find more details in the release notes.
Could you please use the new version and provide us with your feedback?
Hello everyone!
We've released a new beta version of the action. The configuration file structure was changed to provide more flexibility and readability. For more information, see the release notes.
If you have any questions, ideas or concerns, please share them in this issue.
Hello everyone!
We have released the new major version of the action, which contains a new, more intuitive and flexible configuration file structure. Please read the action documentation to find out how to adapt your configuration files and workflows for use with the new action version.
Thank you all for your patience!
Do not hesitate to contact us if you have any questions!
Activity
hauleth commentedon Sep 25, 2020
I also spotted this. It happens if I have more than one entry in the
anyspecifier.hauleth commentedon Sep 27, 2020
Ok, I have found what is the culprit there. The meaning of
anyandallis poorly defined. The issue there is thatand
Have different meaning. The list in
anymean that any file in the PR must match all globs in the list. Withallit mean that all files in the PR must match all globs in the list. So to have the same behaviour withanyyou need to use:mittalyashu commentedon Sep 28, 2020
Nope. Still don't get it 😅
hauleth commentedon Sep 28, 2020
@mittalyashu assume that you have such definition
any: ['src/*', '*/test/*']. Then it will apply the tag if any of the files matches all globs. So for example if your PR changes files:examples/foosrc/test/fooThen it will apply, as
src/test/foomatches both of the globs. However if list of files would look like:examples/test/fooThen it will not match, because while
*/test/*matches, thesrc/*doesn't, so whole filter fails.You can think of it like (using Ruby syntax):
any-changed_files.any? { |file| matches.all? { |match| file.matches(match) } }all-changed_files.all? { |file| matches.all? { |match| file.matches(match) } }mittalyashu commentedon Sep 29, 2020
Oh! I see.
Well, seems like the docs were not clear.
I was thinking that in the
anyfilter, it will match any globs listed in the array.In that case, doesn't that means
anyandallboth plays the same role?hauleth commentedon Sep 29, 2020
Not quite.
allwill check if all modified paths matches whileanywill check if any modified patch matches.BrightRan commentedon Nov 3, 2020
Another user has the similar problem:
https://github.community/t/labler-action-error-typeerror-glob-pattern-string-required-glob-pattern-string-required/140738
He gets the same error message:
BrightRan commentedon Nov 3, 2020
Hi team,
Could anyone take a look at this issue?
kbendick commentedon Nov 4, 2020
I'm also running into this issue. I'm unable to use any configuration that has
anyin it on 2.2.0.smokhov commentedon Jan 14, 2022
Hit this error just now:
It appears to have labeled two things correctly before barfing out.
[meta] disambig 'any' in labeler
Fix PR labeling.
MaksimZhukov commentedon Jun 6, 2023
Hello everyone!
We have released a new major version of the action. The behaviour of the
anyselector was changed to match ANY file against ANY glob pattern so it became more intuitive. Please find more details in the release notes.Could you please use the new version and provide us with your feedback?
MaksimZhukov commentedon Sep 20, 2023
Hello everyone!
We've released a new beta version of the action. The configuration file structure was changed to provide more flexibility and readability. For more information, see the release notes.
If you have any questions, ideas or concerns, please share them in this issue.
MaksimZhukov commentedon Dec 5, 2023
Hello everyone!
We have released the new major version of the action, which contains a new, more intuitive and flexible configuration file structure. Please read the action documentation to find out how to adapt your configuration files and workflows for use with the new action version.
Thank you all for your patience!
Do not hesitate to contact us if you have any questions!