Filters

You can use filters to create triggers that only execute when specified fields match the repository, object, or path involved in the operation that triggers the execution.

The system checks every particular filter for each type of trigger.

If the trigger receives data from the standard input, then the filter applies to each line of this input before the trigger executes. At least one filter must match with a line in the standard input for the trigger to execute, but it's not mandatory that all lines in the standard input match with the specified filters.

Note: Each trigger type accepts different filter elements.

Filter by repository

You can filter by repository (rep:) in all types of triggers. For example:

--filter="rep:myrepo".

Filter syntax

Filters are a comma-separated list, and admit regular expressions. If you need to use a comma character inside a filter, remember to scape it: \,.

For example, you can filter by an exact name for a repository, object or path:

--filter="rep:code,BL101"

Filters also support wildcards:

  • --filter="STATUS,br*"
  • --filter="rep:test*"