The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

Prevent squashed commits in master branch

Julián Lastiri
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 6, 2023

Hello,

I have a repository where I have two merge strategies enabled (Merge commits, squashed)

I want to prevent squashed commits in the master branch but I want to allow merge/squashed commits in all other branches.

I came across the following thread (https://community.atlassian.com/t5/Bitbucket-questions/Enforce-a-merge-strategy-per-branch-using-a-merge-hook/qaq-p/1968218) which describes the same problem but the solution is implemented with hooks and I would like to to see if there is an option to implement it  with Bitbucket ScriptRunner conditional merge check.

Is it possible to fetch the merge strategy through MergeRequest.getContext ? How?
If not, is there any other option to check which is the the merge strategy with ScriptRunner?

Thanks.

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events