Conditional Merge Check

Conditional merge checks allow you to specify a condition that causes a pull request merge to be vetoed when evaluated as 'true'

Click the '?' to see a list of available binding variables. Some are ScriptRunner built-in closures while others provide links to Java docs. There are also various snippet examples available via the Show snippets link that can help you understand how to use these variables.

You can select the projects/repositories this conditional merge check applies to.

When specifying a conditional merge check, you will need to provide a customised veto message that displays to the user whose merge is being prevented.

A number of snippets are available to use out of the box. The snippets are just the starting point, and you can build on those snippets to enforce complex merge checks. Some examples of the snippets available are as below:

At least one reviewer has marked the pull request as needs more work

You can block a pull request merge if one of the reviewers marks the pull request as needing more work as shown below:

Require all mandatory reviewers to approve

All mandatory reviewers added via ScriptRunners Auto-Add Reviewers to a Pull Request or Dynamically Add Reviewers to a Pull Request must approve.

On this page