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

Have regex operation under the content option #109

Open
iddocohen opened this issue Oct 18, 2018 · 2 comments
Open

Have regex operation under the content option #109

iddocohen opened this issue Oct 18, 2018 · 2 comments

Comments

@iddocohen
Copy link

Is your feature request related to a problem? Please describe.
With ISSUE_TEMPLATE.md where titles are defined, sometimes, users will not put enough information for a given section. e.g. if there is a title "Description" under it they will not put any content. Hence if the tool could be enhance to support regex, then one could catch that case as well.

Describe the solution you'd like
Support regex operation under the "content" setup.

Describe alternatives you've considered
One could look into rather then support regex to have support for: "between this and this title, X amount of characters must be given". It would solve the issue above but would be harder for the developer to do.

Additional context
Please ping me if that enhancement request is not clear and happy to elaborate more.

@helloqiu
Copy link
Contributor

With ISSUE_TEMPLATE.md where titles are defined, sometimes, users will not put enough information for a given section.

Aggree. This is a problem indeed.
I thought there should be a min length of characters between each sections and it should be configurable when I created this app. But I realised that if users do not want to write more, these rules are all easy to bypass. And it is hard to filter those issues without human. So I make this app aim to filter those issues which ignore the issue template in the repo at all.

Support regex operation under the "content" setup.

I am a little confused about how regex can solve this problem. It would be great if you can show some examples. If there are good solutions to this problem, I am willing to contribute to make this app better. 😄
@iddocohen

@iddocohen
Copy link
Author

Thank you for the quick feedback @helloqiu

You are right, users can always bypass rules, especially as the config is public available and one can look and see on "how to avoid it" but I would believe the likelihood that people do that is slim and if those still do it the human can always then come back and close it.

It would be more flexible though to have a "min length between section" then having none.

I suggested the regex route to give you less headache but I am just realising it could give you more headache :-)

The idea was the following under content to have:

content:
   - value_of_regex_outcome: "(?<=Description )(.*?)(?=Use-Cases)"

check:
    - length: value_of_regex_outcome > 10

(sorry for the dirty yaml and regex syntax, just between meetings)

Hopefully it explains it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants