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

How to reject merge commits using Adaptivist Scriptrunner?

Michael Brennan Dec 18, 2017


How can I create a pre-receive hook to reject merge commits using Adaptivist Scriptrunner for BitBucket?   This page mentions it's possible: , but doesn't describe how.  I suspect my installation is using an older version of the plugin, because it isn't specifically listed in the examples.  Presumably there is some block of Groovy code I can add to do it.

1 answer

0 votes

Hello Michael.

This is a pre-receive hook that is built-in, so you wouldn't need to even craft this yourself. What version of Scriptrunner for Bitbucket are you on? Would you consider upgrading?



Michael Brennan Jan 05, 2018 • edited

Hi Daniel,


It's not a built-in pre-receive hook for the version I'm using. I'm not sure how to check the version, how can I find that?

I don't have the option of upgrading it since I work for a very large corporation and have no control over what version they are using.  There should be fairly straight-forward way of doing it in the Groovy-based API though shouldn't there?

Michael Brennan Jan 12, 2018

Hello, any update on this?

Without information about your scriptrunner version I really can't give you relevant information.

Could you please tell me your version? We can take it from there.



Michael Brennan Jan 12, 2018

How can I detect the version?

Go to Administration->Manage Addons and select Scriptrunner from the dropdown. Also please provide me with your Bitbucket version.

Here are some pictures to guide you:

Screen Shot 2018-01-15 at 11.32.40.pngScreen Shot 2018-01-15 at 11.34.17.png

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...

3,029 views 1 20
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