-
Notifications
You must be signed in to change notification settings - Fork 421
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
Support for exclusion paths #9
Comments
This seems like a helpful idea! I think we probably should be able to do something like this, I want to be careful here though - I don't want to break existing configurations, so I don't want to change the syntax of the I think a better approach might be to support
Probably, we'd want to evaluate sequentially until we find a pattern that matches. So that way we could even do something like:
The above example would not match Thoughts? |
Actually, that's exactly why I proposed the syntax above. Maps aren't currently handled and it should be possible to support existing configuration files without breaking them. I had thought about negation, but my fear is that it would cause confusion with the semantics of the list as it stands today. Today the label is applied if any path matches. Should negation mean that a non-match should receive the label? Or that we should stop searching? It would also mean that the order of the rules matter. That's why I figured it would be better to be explicit with a map. That being said, if you're comfortable with order being significant, then I'd certainly prefer your proposed syntax. It's certainly simpler than what I proposed! |
Ah I see, that makes sense - at the same time, I don't think I want us to support 2 different syntaxes if possible though - that leads me to prefer an additive pattern if possible
I actually think this is a pretty common pattern that I've seen elsewhere. I think as long as we doc it, it should be fine. I think it makes intuitive sense as well (at least to me 😄). |
Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes actions#9
Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes actions#9
Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes actions#9
Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes actions#9
Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes actions#9
@damccorm took a stab at this. Testing against a local repo has proven to provide the flexibility we need. |
Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes actions#9
i'm trying to use this to match only if specific file is changed, but not if that specific file and another one are modified but dosn't seem possible with this change. the idea would be to add the label only if all the files match the pattern, is that possible? |
@fluzzi discussion is taking place in #22. However, I think I can support your use case if the maintainers are willing to accept my Your use case could be represented as:
|
Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes actions#9
Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes actions#9
* Add support for exclusions Paths can be negated to stop searching through the remaining patterns in a the glob list. All changed files tested and at least one matching file will result in a label being added. Fixes #9 * Add support for "AND"-ed matches A new "rich" matcher object can be provided instead of a normal glob. The matcher object has two fields that accept an array of globs: * Globs in "all" must all match every changed file. * Globs in "some" must all match at least one changed file. Combined with negated globs, this allows for a precise control of when labels are applied. * Rename `some` to `any` * Update README
There are cases where we want to match an entire directory but not certain subdirectories.
Instead of having to list each matching subdirectory, it would be nice to be able to exclude some paths from a match.
An example may be:
The text was updated successfully, but these errors were encountered: