Conditions

Conditions define when a rule applies. They act as a filter before any validation starts. A rule is only evaluated when its trigger fires and all configured conditions are satisfied. This allows teams to apply rules selectively based on context, such as branch patterns.

Conditions can be added to an existing rule to control in which situations that rule should be evaluated.

Screenshot 2026-04-11 at 15.20.16.png

Pull request condition

The pull request condition controls whether a rule applies based on pull request information.

It is used to restrict rule execution to specific pull request flows by evaluating the destination branch. This makes it possible to target rules to defined integration paths, such as merges into release branches, main branches, or other controlled target branches. By applying rules only where they are relevant, the pull request condition helps reduce unnecessary validations and supports more precise compliance enforcement.


condtion-pullrequest.png



Configuration options

Option name

Description

Values

Destination branch

Defines conditions for the pull request target branch.

  • include matching patterns

  • exclude blocked patterns


Branch condition

The branch condition controls whether a rule applies based on the current branch name.

It is used to restrict rule execution to specific branches by evaluating the branch against configured include and exclude patterns. This makes it possible to target rules to defined branch types, such as feature branches, bugfix branches, release branches, or other repository-specific workflows.

By applying rules only where they are relevant, the branch condition reduces unnecessary validations and enables more precise compliance enforcement.

condtion-branch.png


The branch condition is evaluated for Commit, Push, and Pull Request validations. The branch that is evaluated depends on the trigger and context:

  • For Commit validations, the current branch is evaluated.

  • For Push validations, the branch being pushed is evaluated.

  • For Pull Request validations, the branch condition is evaluated against the source branch of the pull request.

As a result, the same branch condition can be reused consistently across different stages of the development workflow.

Option name

Description

Values

Branch

Defines conditions for the pull request source branch.

  • include matching patterns

  • exclude blocked patterns


Pattern matching strategy

Each include and exclude condition can contain one or multiple regular expressions. If multiple include patterns are configured, the pattern matching strategy defines whether:

  • All patterns must match

  • At least one pattern must match


Examples:

Branch

Destination branch

Result Push

Result Pull

feature/login

release/1.0.x

Executed

Branch does match the configured include pattern (feature/.*)

Executed

Source branch matches an include pattern (^feature/.*) and destination branch matches an include pattern (release/.*).

bug/login

release/1.0.x

Executed

Branch does match the configured include pattern (bug/.*)

Executed

Source branch matches an include pattern (^bug/.*) and destination branch matches an include pattern (release/.*).

feature/login

feature/backend

Executed

Branch does match the configured include pattern (feature/.*)

Skipped

Destination branch matches an exclude pattern (feature/.*). (at least one)

feature/login

bug/backend

Executed

Branch does match the configured include pattern (feature/.*)

Skipped

Destination branch matches an exclude pattern (bug/.*). (at least one)

release/1.0.x

release/1.0.x

Skipped

Branch does match the configured exclude pattern (release/.*).

Skipped

Source branch matches an exclude pattern (release/.*)

feature/login

main

Executed

Branch does match the configured include pattern (feature/.*)

Skipped

Destination branch does not match the configured include pattern (release/.*).

develop

release/1.0.x

Skipped

Branch does not match the configured include pattern

  • (feature/.*

  • (bug/.*)

Skipped

Source branch does not match any configured include pattern

  • (feature/.*)

  • (bug/.*)


Key takeaway

The pull request condition allows rules to be applied selectively based on source and target branch patterns.

Extensibility

The condition model is designed to support additional condition types in the future.