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)
Join our 3-part live learning series with community leader Robert Hean to master how to leverage Confluence for Marketing teams. Learn how to plan and execute on projects seamlessly and how to turn insights into lasting organizational knowledge. 🧠
Register today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.