-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Can include/exclude regex patterns be handled? #33
Comments
Tested in a test repository of my own, and it looks like the mentioned regex pattern is not appropriately dealt with:
Looks like the regex cannot be read properly in here (?): Does addressing this look doable @srvaroa ? Thanks for the effort. |
Mentioned in vmware-tanzu/vm-operator#50 (review) (this was not added automatically for some reason) |
Hi, sorry I totally missed this issue. I will take a closer look into this in the coming days. Thanks for reporting. |
@jhlegarreta, @akutz: I believe this thread might be helpful to you:
@srvaroa: Presumably, this is about the same issue. |
Yeah, I will add a couple of test cases to prove the examples provided above. |
@philippwaller thanks for the heads-up; @srvaroa thanks for the documentation; I will try to test it as time permits. |
It is unclear if this actually adds support for excluding file patterns. The Apply this label if CONDITION except for GENERATED FILES Essentially we want to apply labels based on the size of the change, but the size should not be calculated based on changes related to generated content. |
That would be great, thank you! Please see https://github.com/vmware-tanzu/vm-operator/blob/3ebc8097d391c2356073d7c327b1b0f72d44f5b0/.github/workflows/pr-labeler.yml#L12-L33 for more information. |
@jhlegarreta @akutz this should deal with the exclusions in the Size condition. There is an example that should be reasonably understandable in the tests. Let me knot if this looks good for you and I'll get this released asap. |
Signed-off-by: Galo Navarro <[email protected]>
@jhlegarreta I have added a couple of tests to verify the conditions you quoted above. It looks like the expressions work correctly after escaping the characters. Let me know if that solves your use case. |
Signed-off-by: Galo Navarro <[email protected]>
I will close this for now, but @jhlegarreta do let me know if your issue is still not solved. |
I am wondering whether regex patterns that have both include/exclude parts are correctly handled.
I would like to be able to mark all files whose path matches a pattern with a label, but to avoid apply a different label to files that share only part of the path.
As an example, I have a label named
area:Book
that I'd like to apply to all*.tex
files under theSoftwareGuide/Latex
path:At the same time, I have a label named
type:BookStyle
that should apply to all files under theLatex
path, but not to the files underSoftwareGuide/Latex
. Using the pattern below:will add both labels to a file like
SoftwareGuide/Latex/Appendices/CodingStyleGuide.tex
added in a commit.I am wondering whether modifying the second rule to
would avoid applying the
type:BookStyle
label toSoftwareGuide/Latex/Appendices/CodingStyleGuide.tex
.Cross-referencing:
InsightSoftwareConsortium/ITKSoftwareGuide#167
Thanks and sorry to ask a question by opening an issue.
The text was updated successfully, but these errors were encountered: