Clarification on Branch Naming Policy

Issue #196 on hold
Former user created an issue

Hi,

I have one question regarding the Branch Naming Policy configuration: Are the three provided options ANDed to each other, i.e. if I enable multiple checks, all checks must be matched?

Background for asking: We configured a default branching model (release, feature, hotfix, bugfix) and need one additional branch type (sync/) that's not covered by the branching model. If I configure ControlFreak by enabling "Repository's Branching Model" and enabling "Regex" with a value of "sync/*", the creation of a new sync/ branch is blocked by ControlFreak.

What's the recommended solution? Remove the checkbox from branching model and list all branch types in the regex? What would be the syntax to name multiple branches in the regex? Is it a real regex or is it pattern matching?

Thanks and best regards, Michael Handwerker

Comments (4)

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

    Yes, all three are AND’ed together.

    So to accomplish your goal I think you’d need to uncheck “[ ] - Matches Repository’s Branching Model” and use a regex instead, e.g., something like this (you can use “|” pipes to OR-together several wildcard patterns in a Java regex):

    release/.*|feature/.*|bugfix/.*|hotfix/.*|sync/.*
    

  2. Michael Handwerker

    Hi,

    thanks for the feedback and clarification. I’ll try to use the regex-based approach then.

    Regards,

    Michael

  3. Log in to comment