Skip to content
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

Add exclude option with wildcard matching on label names #1

Merged
merged 1 commit into from Oct 20, 2019

Conversation

haltcase
Copy link
Contributor

Add an exclude option that allows for preventing certain labels from being altered, for more granular control than skip_delete alone.

exclude: 'area/*'

GitHub seems to only support passing strings so you can't pass a bare array, however multiple patterns can still be passed by surrounding a YAML string array with quotes:

exclude: "['area/*', 'os/*']"

The matching is a simple wildcard pattern rather than full glob syntax — we're not matching paths. This is implemented using matcher.

The tests can be seen here.

🏃 Running GitHub Labeler
⚠️ Skipping update for 'bug' label. Same color and description
🚫️ Excluding 'enhancement' from update.
⚠️ Skipping update for 'good first issue' label. Same color and description
⚠️ Skipping update for 'help wanted' label. Same color and description
⚠️ Skipping update for 'invalid' label. Same color and description
⚠️ Skipping update for 'question' label. Same color and description
🚫️ Excluding 'wontfix' from rename.
🚫️ Excluding 'documentation' from deletion.
🚫️ Excluding 'duplicate' from deletion.

@crazy-max
Copy link
Owner

Awesome @citycide! Thanks for your contrib! 🚀

@crazy-max crazy-max merged commit c742dd7 into crazy-max:master Oct 20, 2019
@crazy-max
Copy link
Owner

crazy-max commented Oct 20, 2019

@citycide PS: Use npm prune --production before pushing next time ;)

@haltcase
Copy link
Contributor Author

@crazy-max sure thing - might be good then to have that in a contributing guide, and included or linked in the readme. I've never included node_modules in a repo before but I guess it's different for Actions.

@crazy-max
Copy link
Owner

sure thing - might be good then to have that in a contributing guide, and included or linked in the readme.

I've added a workflow to detect this behavior ;)
But yeah a contributing guide would be better :)

I've never included node_modules in a repo before but I guess it's different for Actions.

Yes indeed, for actions node_modules is needed. Not really on master branch but I prefer to keep it to allow users to test an action on master.

@haltcase haltcase deleted the feat-exclude branch December 9, 2019 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants