Comments (11)
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:
- any: ['./*']
- any: ['./src/*']
from labeler.
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?
from labeler.
I also spotted this. It happens if I have more than one entry in the any
specifier.
from labeler.
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.
Nope. Still don't get it
from labeler.
@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.
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) } }
from labeler.
Oh! I see.
Well, seems like the docs were not clear.
I was thinking that in the any
filter, it will match any globs listed in the array.
In that case, doesn't that means any
and all
both plays the same role?
from labeler.
Not quite. all
will check if all modified paths matches while any
will check if any modified patch matches.
from labeler.
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:
##[error]TypeError: glob pattern string required
##[error]glob pattern string required
from labeler.
Hi team,
Could anyone take a look at this issue?
from labeler.
I'm also running into this issue. I'm unable to use any configuration that has any
in it on 2.2.0.
from labeler.
Hit this error just now:
- https://github.com/OpenISS/OpenISS/blob/master/.github/labeler.yml
- OpenISS/OpenISS#86
- https://github.com/OpenISS/OpenISS/runs/4811417470
It appears to have labeled two things correctly before barfing out.
from labeler.
Related Issues (20)
- Follow CODEOWNERS file HOT 1
- Support labeling based on size of change HOT 9
- Dependabot update actions/labeler v4.0.2 to 4.1.0 HOT 6
- Using template to install workflow results in broken action HOT 3
- Documentation: Describe how to label if _any_ file in the repository has changed or to _every_ PR HOT 2
- Algo issue on CheckAny Function HOT 4
- Jarvis I.Mays ```suggestion HOT 1
- HttpError: Server Error when using labeler with over 50 labels HOT 1
- v5.0.0-alpha.1 HOT 15
- A HOT 1
- Question: Howto set a label if 2 files are changed within one PR HOT 3
- Removes label if someone applies it manually before the action runs HOT 4
- Labeler does not match **/*.[extension] HOT 8
- vcs labels HOT 1
- Unable to resolve action `actions/[email protected]`, unable to find version `v4.2.0` HOT 6
- https://www.facebook.com/profile.php?id=100024424234304&mibextid=ZbWKwL HOT 1
- Option to preserve manually added labels HOT 8
- Milestone to set on pull requests HOT 1
- Bug with files in root folder HOT 4
- labeler.yml file from local can not be accessed HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from labeler.