It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Branch create restriction- using script runner

Mani Jan 19, 2018

I am trying to create a groovy script to restrict branch creation based on the branch type selected. For example, we would like to restrict any new bugfix type branch creation.

I have tried using the "BranchCreationRequestedEvent", however I couldn't find any access methods to capture the branch type. getType() method from the Branch "CreationRequestedEvent" seems to return "BRANCH" instead of the actual branch type.


Any suggestions on how to capture the branch type?

1 answer

0 votes

Hi Mani.

You want this tutorial about pre-receive hooks.

You want to enforce naming conventions I suppose.

Do say if this helped or not.



Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,997 views 1 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you