Class BranchDiscoveryTrait.BranchDiscoverySCMHeadFilter
java.lang.Object
jenkins.scm.api.trait.SCMHeadFilter
io.jenkins.plugins.gitlabbranchsource.BranchDiscoveryTrait.BranchDiscoverySCMHeadFilter
- Direct Known Subclasses:
BranchDiscoveryTrait.ExcludeOriginMRBranchesSCMHeadFilter,BranchDiscoveryTrait.OnlyExplicitlyListedBranchesSCMHeadFilter,BranchDiscoveryTrait.OnlyOriginMRBranchesSCMHeadFilter
- Enclosing class:
BranchDiscoveryTrait
public abstract static class BranchDiscoveryTrait.BranchDiscoverySCMHeadFilter
extends jenkins.scm.api.trait.SCMHeadFilter
Base class for branch filters that support an always-included regex.
Handles the common filter then delegates to
isExcludedBranch(jenkins.scm.api.trait.SCMSourceRequest, io.jenkins.plugins.gitlabbranchsource.BranchSCMHead) for strategy-specific logic.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBranchDiscoverySCMHeadFilter(Pattern branchesAlwaysIncludedRegexPattern) Constructor -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanisExcluded(jenkins.scm.api.trait.SCMSourceRequest request, jenkins.scm.api.SCMHead head) protected abstract booleanisExcludedBranch(jenkins.scm.api.trait.SCMSourceRequest request, BranchSCMHead head) Strategy-specific exclusion logic, called only for branch heads not covered by the always-included regex.
-
Constructor Details
-
BranchDiscoverySCMHeadFilter
Constructor- Parameters:
branchesAlwaysIncludedRegexPattern- the branchesAlwaysIncludedRegexPattern.
-
-
Method Details
-
isExcluded
public final boolean isExcluded(@NonNull jenkins.scm.api.trait.SCMSourceRequest request, @NonNull jenkins.scm.api.SCMHead head) - Specified by:
isExcludedin classjenkins.scm.api.trait.SCMHeadFilter
-
isExcludedBranch
protected abstract boolean isExcludedBranch(@NonNull jenkins.scm.api.trait.SCMSourceRequest request, @NonNull BranchSCMHead head) Strategy-specific exclusion logic, called only for branch heads not covered by the always-included regex.- Parameters:
request- the current SCM source request.head- the branch head being evaluated.- Returns:
trueif the branch should be excluded from discovery.
-