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
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
We have the MergeChecks script in BitBucket and it has been working; however, after upgraded ScriptRunner to version 8.1.0, the script is broken and gave error:
# Script: get the merge from branch value and to branch value, split it by / and get the second value after splitted. compare them and if the values are the same, allow the merge.
# e.g. toBranch = develop/asc and fromBranch = feature/asc/<Jira-issue>
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: General error during semantic analysis: Expression [BinaryExpression] is not allowed: toBranch.split(/)[1] java.lang.SecurityException: Expression [BinaryExpression] is not allowed: toBranch.split(/)[1] at org.codehaus.groovy.control.customizers.SecureASTCustomizer$SecuringCodeVisitor.assertExpressionAuthorized(SecureASTCustomizer.java:1084) at org.codehaus.groovy.control.customizers.SecureASTCustomizer$SecuringCodeVisitor.visitBinaryExpression(SecureASTCustomizer.java:1300) at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:60) at org.codehaus.groovy.control.customizers.SecureASTCustomizer$SecuringCodeVisitor.visitBinaryExpression(SecureASTCustomizer.java:1303) at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:60) at org.codehaus.groovy.control.customizers.SecureASTCustomizer$SecuringCodeVisitor.visitExpressionStatement(SecureASTCustomizer.java:1173) at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:41) at org.codehaus.groovy.control.customizers.SecureASTCustomizer$SecuringCodeVisitor.visitBlockStatement(SecureASTCustomizer.java:1137) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:70)