siderolabs / conform

Policy enforcement for your pipelines.
Mozilla Public License 2.0
432 stars 45 forks source link

Invalid Jira key is allowed #191

Closed andrevalentin closed 3 years ago

andrevalentin commented 3 years ago

For the Jira key plugin, it allows PR creators to submit commits with JIRA-0 as a key, which it accepts as valid. I think the conform action should flag it as invalid, as that would never be a valid JIRA issue key. The same with JIRA-00 or JIRA-001, anything that starts with a 0 should not be allowed.

I suppose it should be easy for the regex to disallow this. Just make sure the first number after the - should be 1-9.

andrewrynhard commented 3 years ago

I can take a look @andrevalentin. Can't promise how soon I can get to it, so if you would like to contribute that is an option as well. Next week or this weekend is the earliest I could probably take a look if that works for you.

andrevalentin commented 3 years ago

@andrewrynhard since it was just fixing the regex, I went ahead and just did it. Feel free to take a look at the PR when you get time.

cc: @olivernybroe