Use regular expressions to restrict which branches can trigger a Jenkins build. The source branch must match the source branch regex, and, when a target branch is available, the target branch must also match the target branch regex. Both conditions must be satisfied for the branch filter to allow the build. Leave either field empty to disable filtering for that branch.
The entire branch name must match the regular expression, not just a substring.
Examples:
# Match source branches beginning with feature/: feature/.* # Match target branch exactly named main: main # Match a branch containing feature anywhere: .*feature.* # For merge request events, match source branches beginning with feature/ # and target branch main: Source regex: feature/.* Target regex: main # For ordinary push events, both regexes must match the same pushed branch. # This combination therefore rejects all ordinary push events.