The requirement is to set the restrictions such that any new branches pushed to Stash from a developer's machine must follow our naming convention of
"feature/PPT-", "bugfix/PPT-", "hotfix/PPT-", "feature/QC", "bugfix/QC*", or "hotfix/QC*".
We have Yet Another Commit Checker pre-receive hook enabled and it has an option to restrict using
Branch Regex -
If present, pushes to branches that don't match this regex will be blocked. What is the format to be used here, to meet my requirement here? Branch Name Regex
If present, only branches with names that match this regex will be allowed to be created. This affects both new branches being pushed and branches created within the Bitbucket Server UI.
For example, master|(?:(?:bugfix|hotfix|feature)/[A-Z]+-\d+-.+)
would enforce that pushes should be done to branches that follow the Bitbucket Server Branching Model naming convention.
https://github.com/sford/yet-another-commit-checker
Anyone using this already?