public class BranchDiscoveryTrait
extends jenkins.scm.api.trait.SCMSourceTrait
Discovery
trait for GitHub that will discover branches on the repository.Modifier and Type | Class and Description |
---|---|
static class |
BranchDiscoveryTrait.BranchSCMHeadAuthority
Trusts branches from the origin repository.
|
static class |
BranchDiscoveryTrait.DescriptorImpl
Our descriptor.
|
static class |
BranchDiscoveryTrait.ExcludeOriginPRBranchesSCMHeadFilter
Filter that excludes branches that are also filed as a pull request.
|
static class |
BranchDiscoveryTrait.OnlyOriginPRBranchesSCMHeadFilter
Filter that excludes branches that are not also filed as a pull request.
|
Constructor and Description |
---|
BranchDiscoveryTrait(boolean buildBranch,
boolean buildBranchWithPr)
Constructor for legacy code.
|
BranchDiscoveryTrait(int strategyId)
Constructor for stapler.
|
Modifier and Type | Method and Description |
---|---|
protected void |
decorateContext(jenkins.scm.api.trait.SCMSourceContext<?,?> context) |
int |
getStrategyId()
Returns the strategy id.
|
boolean |
includeCategory(jenkins.scm.api.SCMHeadCategory category) |
boolean |
isBuildBranch()
Returns
true if building branches that are not filed as a PR. |
boolean |
isBuildBranchesWithPR()
Returns
true if building branches that are filed as a PR. |
@DataBoundConstructor public BranchDiscoveryTrait(int strategyId)
strategyId
- the strategy id.public BranchDiscoveryTrait(boolean buildBranch, boolean buildBranchWithPr)
buildBranch
- build branches that are not filed as a PR.buildBranchWithPr
- build branches that are also PRs.public int getStrategyId()
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isBuildBranch()
true
if building branches that are not filed as a PR.true
if building branches that are not filed as a PR.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isBuildBranchesWithPR()
true
if building branches that are filed as a PR.true
if building branches that are filed as a PR.protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?,?> context)
decorateContext
in class jenkins.scm.api.trait.SCMSourceTrait
public boolean includeCategory(@NonNull jenkins.scm.api.SCMHeadCategory category)
includeCategory
in class jenkins.scm.api.trait.SCMSourceTrait
Copyright © 2016–2020. All rights reserved.