Defines when the trigger should execute. If left blank the trigger will execute on all events received by the event source. Show {{expanded ? 'less' : 'more'}}...

The following bindings are exposed to the conditions:

  • event - the JSON webhook payload received by the event source
  • event - the JSON object representing the event received from the event source
  • headers - the headers of the received HTTP request
  • parameters - the query parameters of the received HTTP request
  • folderVariables - the variables of the parent folder and its ancestry
  • globalVariables - the variables defined globally in the system

Nested fields can be referenced using dot syntax - event.pull_request.titleevent.application.title, or using square brackets in case the field name contains special characters - headers['X-GitHub-Event']event['operation']. If the referenced field is not present, an exception will be thrown and the trigger will not execute.

The Groovy expression should be a single-line boolean expression or a multi-line script with the boolean value assigned to the result variable. Example of a valid Groovy expression:

headers['X-GitHub-Event'] == 'pull_request' && event.repository.name == 'Hello-World' && event.pull_request.base.ref == 'master' && event.pull_request.labels.contains('BUILD')

event.application.name == 'MyApp' && event.environment.title == 'development'

The Jython expression should be a single-line boolean expression or a multi-line script with the boolean value assigned to the result variable. Example of a valid Jython expression:

headers['X-GitHub-Event'] == 'pull_request' and event.repository.name == 'Hello-World' and event.pull_request.base.ref == 'master' and 'BUILD' in event.pull_request.labels

event.application.name == 'MyApp' and event.environment.title == 'development'

With the Visual designer the trigger will execute only when all the specified conditions are satisfied.

Folder and global variables can be referenced by the string fields using the ${} syntax.