Regex issue in JIRA Policy section of control freak, Brackets around the JIRA id enforced ?

Issue #122 new
Dibble, Erik created an issue

Hi,

I have an issue with my regex in the JIRA Policy section of Control Freak ,

I crafted a regex as:

.*BUG_NUMBER\=\[(ET\-[0-9]+)+\].*

and with this example input it works fine:

BUG_NUMBER=[EE-12345]

However,

I prefer my regex to be without [ ]'s (brackets)

.*BUG_NUMBER\=(ET\-[0-9]+)+.*

and accept inputs like

BUG_NUMBER=EE-12345

but it does not work.

Does the Jira # have to be in [ ] brackets ? Any way around this ?

Any ideas ?

(ControlFreak v.2019.10.20)

(Bitbucket v.6.2.0)


Regards,

Erik

Comments (6)

  1. Julius Davies [bit-booster.com] repo owner

    Do you have admin privileges on the repo? If so, can you confirm if this Control Freak setting is set to “Yes” or “No” ?

    Only Check Jiras In Brackets: [x] Yes [ ] No

    If that setting is set to “Yes” then only Jiras in brackets will be checked. Jiras outside brackets will be ignored!

  2. Dibble, Erik reporter

    Hi,

    Yes I have admin privs.

    It was set to Yes – after you replied I set it to No. It works, but it seems it expects a word boundary.

    BUG_NUMBER= EE-12345 works # note the space after '='

    BUG_NUMBER=EE-12234 doesn’t work.

    (Note I have also selected  Anywhere in commit message button)

    Thanks for your reply.

  3. Julius Davies [bit-booster.com] repo owner

    Ah, yes, that equals sign will trip it up. We’re using our own hard-coded regex to find Jira tickets in the commit message. I’ll adjust the hard-coded regex to tolerate symbols just before the Jira ticket.

    We’ll probably publish a release with this change within 3-4 weeks.

  4. Dibble, Erik reporter

    Ok. Sounds good.

    I’ll workaround this by adding padding in one of the GIT client commit msg hooks.

    Thanks for your quick responses.

    --

    Erik

  5. Log in to comment