-
Notifications
You must be signed in to change notification settings - Fork 20
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
[Feature] Filter : include/exclude #1
Comments
This would be pretty cool to have. Also, I'd suggest you change the Line 79 in a2f6df8
And replace Line 81 in a2f6df8
|
@rnsc I think that is a great idea! Thanks for submitting it the issue. You are more than welcome to send a PR 😉 |
@rmed19 I would like to know your opinion about this, since the current implementation is yours. 😄 |
What do you think about modeling the include/exclude filters after GitHub Actions' A use case that I can think of is that you only want to run an action when |
Hey, thank you for the feedback! |
My main motivation is to stay close to what already exists, the list of regexes is not something I came up with myself, it's GH's way™. However, it allows to have positive and a negative patterns grouped together: with:
paths:
- 'sub-project/**'
- '!sub-project/docs/**' One aspect I didn't mention is that GH does not allow both Maybe it does not need to be this complex, the main advantage I see is that you could copy&paste the |
* First commit with include/exclude filters * Enable manual workflow runs * Updated index.js * add an action run with filters * required include * negative lookup * updated index.js * updated package.json * new regex test * updated workflow * rollback packages update * change the invert match logic * fix regex * testing dummy files * better assignment * remove dummy test files * original packages.json * fix yarn issue
[Feature] include/exclude filters (#1)
Hello @Ana06 ,
I've looked at the code already and I see that the filtering implementation is leveraging regex to filter files.
I have a particular case that would require include a certain type of files but also exclude specific paths at the same time.
ie:
So I need to match all *.yml, but not *.yml that are in a test folder for example.
Now, while I undertsand I could make a convoluted regex to do that, I would also want to keep it simple.
Would you welcome a change where we change the
filter
byinclude
andexclude
both supporting regex, and add a bit more code logic?I'd be willing to have a poke at it.
Thanks,
The text was updated successfully, but these errors were encountered: