-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CI(labeler): Fix RFC exclusion from docs, adjust other globs #3360
Conversation
@neteler Would you mind taking a quick look at this? It solves the misconfiguration that ends up adding the docs label to every PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
(The blabla/**/*
pattern was given as example at https://github.com/actions/labeler at the time I initially created original PR, indeed redundant.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't really judge the any-glob-to-any-file
filter but it looks reasonable.
The v5 in december changed a lot of the config. And the place they use it is not enough to know if it is good everywhere or for this advanced case only. I suppose the writer used this (for that example) as it is similar to an edge case in the cache/artifact upload with exclusions. In these, if you have a glob that includes files and subdirectories, but you want to exclude a specific subdirectory, the inclusion and exclusion pattern must have the same levels of hierarchy for the exclusion to work correctly. It is related to the way they squash down the directories for compression, such as there isn't 10 folders with a common path before the items start getting different. But here, how it's written, they seem independent and the result of the globs are used for the boolean logic. |
* CI(labeler): Fix RFC exclusion from docs, adjust other globs (OSGeo#3360) * CI(labeler): Fix RFC exclusion from docs * CI(labeler): Simplify double star globs when appropriate * CI(labeler): Add database to `**.sql` files * CI: Use multiple cores for grass build in CodeQL * CI: Add concurrency group for CodeQL * CI(CodeQL): Run all analysis concurrently, but don't build for python * CI(CodeQL): Remove Python dependency installation
A little tune up in three parts:
any
butall
. So, inside thechanged-files
, the results of the optionsany-glob-to-any-file
,any-glob-to-all-files
,all-globs-to-any-file
andall-globs-to-all-files
wereOR
-ed together. That is because by default, ifany
orall
is missing,any
is used. I expected the results of the individual sections of globs to beAND
-ed together, ie the behavior ofall
.blabla/**/*
was redundant toblabla/**
, as a single star matches everything except a slash, and a double star matches everything. Their examples also show it.For both points 1 and 2, I « changed » my main branch with the changes one by one and I did PRs in my fork to be able to test that the behaviour is correct. (The trigger is at pull_request_target, so the workflow already needs to be in the target to run)