Class BranchDiscoveryTrait
java.lang.Object
hudson.model.AbstractDescribableImpl<T>
jenkins.scm.api.trait.SCMTrait<jenkins.scm.api.trait.SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTrait
io.jenkins.plugins.gitlabbranchsource.BranchDiscoveryTrait
- All Implemented Interfaces:
- ExtensionPoint,- Describable<jenkins.scm.api.trait.SCMSourceTrait>
public class BranchDiscoveryTrait
extends jenkins.scm.api.trait.SCMSourceTrait
A 
Discovery trait for GitLab that will discover branches on the repository.- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classTrusts branches from the origin repository.static classOur descriptor.static classFilter that excludes branches that are also filed as a merge request.static classFilter that excludes branches that are not also filed as a merge request.Nested classes/interfaces inherited from interface hudson.ExtensionPointExtensionPoint.LegacyInstancesAreScopedToHudson
- 
Constructor SummaryConstructorsConstructorDescriptionBranchDiscoveryTrait(boolean buildBranch, boolean buildBranchWithMr) Constructor for legacy code.BranchDiscoveryTrait(int strategyId) Constructor for stapler.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voiddecorateContext(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) Returns the branchesAlwaysIncludedRegex.Returns the compiledPatternof the branchesAlwaysIncludedRegex.intReturns the strategy id.booleanincludeCategory(jenkins.scm.api.SCMHeadCategory category) booleanReturnstrueif building branches that are not filed as a MR.booleanReturnstrueif building branches that are filed as a MR.voidsetBranchesAlwaysIncludedRegex(String branchesAlwaysIncludedRegex) Sets the branchesAlwaysIncludedRegex.Methods inherited from class jenkins.scm.api.trait.SCMSourceTrait_for, _for, all, applyToBuilder, applyToContext, applyToObserver, decorateBuilder, decorateObserver, getDescriptor, isCategoryEnabledMethods inherited from class jenkins.scm.api.trait.SCMTraitasSetList, asSetList, find
- 
Constructor Details- 
BranchDiscoveryTrait@DataBoundConstructor public BranchDiscoveryTrait(int strategyId) Constructor for stapler.- Parameters:
- strategyId- the strategy id.
 
- 
BranchDiscoveryTraitpublic BranchDiscoveryTrait(boolean buildBranch, boolean buildBranchWithMr) Constructor for legacy code.- Parameters:
- buildBranch- build branches that are not filed as a MR.
- buildBranchWithMr- build branches that are also MRs.
 
 
- 
- 
Method Details- 
getStrategyIdpublic int getStrategyId()Returns the strategy id.- Returns:
- the strategy id.
 
- 
getBranchesAlwaysIncludedRegexReturns the branchesAlwaysIncludedRegex.- Returns:
- the branchesAlwaysIncludedRegex.
 
- 
setBranchesAlwaysIncludedRegex@DataBoundSetter public void setBranchesAlwaysIncludedRegex(@CheckForNull String branchesAlwaysIncludedRegex) Sets the branchesAlwaysIncludedRegex.
- 
getBranchesAlwaysIncludedRegexPatternReturns the compiledPatternof the branchesAlwaysIncludedRegex.- Returns:
- the branchesAlwaysIncludedRegexPattern.
 
- 
isBuildBranch@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isBuildBranch()Returnstrueif building branches that are not filed as a MR.- Returns:
- trueif building branches that are not filed as a MR.
 
- 
isBuildBranchesWithMR@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isBuildBranchesWithMR()Returnstrueif building branches that are filed as a MR.- Returns:
- trueif building branches that are filed as a MR.
 
- 
decorateContextprotected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) - Overrides:
- decorateContextin class- jenkins.scm.api.trait.SCMSourceTrait
 
- 
includeCategorypublic boolean includeCategory(@NonNull jenkins.scm.api.SCMHeadCategory category) - Overrides:
- includeCategoryin class- jenkins.scm.api.trait.SCMSourceTrait
 
 
-