You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.