Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script Runner: branch naming regex doesn't work when making branches in the Web UI

Matthew Douston May 10, 2018

I can use Script Runner to set up a pre-hook naming regex rule for branch names so that they have to contain a Jira issue number (or at least a string that's formatted like a Jira issue number): 

feature/[A-Z]{2,9}-\d+.*

This allows me to push "feature/ADBD-1234" to the repo, but not "feature/ABDC", or "myBranchName", which is what I want. 

However, this only works when creating a branch locally and trying to push it into the repo. In Bit Bucket's web UI I can create branches and name them whatever I want and Script Runner doesn't seem to be set up to catch it. 

Does anyone know how to make it such that branch naming policies are also enforced when creating branches in the Bit Bucket web UI? 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events