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

Support negative conditions #31

Closed
chubchenko opened this issue Sep 7, 2021 · 4 comments
Closed

Support negative conditions #31

chubchenko opened this issue Sep 7, 2021 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@chubchenko
Copy link

Hi, first of all, thanks for that solution 🙏

In one of my repositories, I would like to define a list of available branch types. And if someone created a branch and has opened a PR with a name that does not match any conditions I would like to add an unknown label.

I tried to do that via my own conditions

- label: "unknown"
  branch: "^((?!feature|bugfix).)*$"

but then realize that it does not work since Go regex does not support ?! 😞

@srvaroa
Copy link
Owner

srvaroa commented Sep 14, 2021

Thanks @chubchenko, I'll try to get this done sometime soon, but PRs are welcome!

@srvaroa
Copy link
Owner

srvaroa commented Feb 20, 2023

Hi @chubchenko since this is a limitation in Go's regex library I've tried an imperfect workaround. I'm interested in knowing if this would cover your use case: #67

@srvaroa
Copy link
Owner

srvaroa commented Feb 20, 2023

Workaround merged, please refer to: https://github.com/srvaroa/labeler#negate-rules, let me know if this solves this use case. Will be released in v1.3

@srvaroa srvaroa closed this as completed Feb 20, 2023
@chubchenko
Copy link
Author

@srvaroa Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants