Class ForkMergeRequestDiscoveryTrait
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.ForkMergeRequestDiscoveryTrait
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.scm.api.trait.SCMSourceTrait>
public class ForkMergeRequestDiscoveryTrait
extends jenkins.scm.api.trait.SCMSourceTrait
A
Discovery
trait for GitLab that will discover merge requests from
forks of the
project.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Our descriptor.static class
AnSCMHeadAuthority
that trusts everyone.static class
AnSCMHeadAuthority
that trusts Members to the project.static class
AnSCMHeadAuthority
that trusts nothing.static class
AnSCMHeadAuthority
that trusts those with required permission to the project.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionForkMergeRequestDiscoveryTrait
(int strategyId, jenkins.scm.api.trait.SCMHeadAuthority<? super GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision> trust, boolean buildMRForksNotMirror) Constructor for stapler.ForkMergeRequestDiscoveryTrait
(Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies, jenkins.scm.api.trait.SCMHeadAuthority<? super GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision> trust, boolean buildMRForksNotMirror) Constructor for programmatic instantiation. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
decorateContext
(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) boolean
Gets the buildMRForksNotMirrorSet<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy>
Returns the strategies.int
Gets the strategy id.jenkins.scm.api.trait.SCMHeadAuthority<? super GitLabSCMSourceRequest,
? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision> getTrust()
Gets the authority.boolean
includeCategory
(jenkins.scm.api.SCMHeadCategory category) void
setBuildMRForksNotMirror
(boolean buildMRForksNotMirror) Setter for stapler to set the buildMRForksNotMirrorMethods inherited from class jenkins.scm.api.trait.SCMSourceTrait
_for, _for, all, applyToBuilder, applyToContext, applyToObserver, decorateBuilder, decorateObserver, getDescriptor, isCategoryEnabled
Methods inherited from class jenkins.scm.api.trait.SCMTrait
asSetList, asSetList, find
-
Constructor Details
-
ForkMergeRequestDiscoveryTrait
@DataBoundConstructor public ForkMergeRequestDiscoveryTrait(int strategyId, @NonNull jenkins.scm.api.trait.SCMHeadAuthority<? super GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision> trust, boolean buildMRForksNotMirror) Constructor for stapler.- Parameters:
strategyId
- the strategy id.trust
- the authority to use.buildMRForksNotMirror
- the buildMRForksNotMirror flag
-
ForkMergeRequestDiscoveryTrait
public ForkMergeRequestDiscoveryTrait(@NonNull Set<jenkins.scm.api.mixin.ChangeRequestCheckoutStrategy> strategies, @NonNull jenkins.scm.api.trait.SCMHeadAuthority<? super GitLabSCMSourceRequest, ? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, ? extends jenkins.scm.api.SCMRevision> trust, boolean buildMRForksNotMirror) Constructor for programmatic instantiation.- Parameters:
strategies
- theChangeRequestCheckoutStrategy
instances.trust
- the authority.buildMRForksNotMirror
- the buildMRForksNotMirror flag
-
-
Method Details
-
getStrategyId
public int getStrategyId()Gets the strategy id.- Returns:
- the strategy id.
-
getStrategies
Returns the strategies.- Returns:
- the strategies.
-
getTrust
@NonNull public jenkins.scm.api.trait.SCMHeadAuthority<? super GitLabSCMSourceRequest,? extends jenkins.scm.api.mixin.ChangeRequestSCMHead2, getTrust()? extends jenkins.scm.api.SCMRevision> Gets the authority.- Returns:
- the authority.
-
getBuildMRForksNotMirror
public boolean getBuildMRForksNotMirror()Gets the buildMRForksNotMirror- Returns:
- true to build MR for Forks that are not Mirror
-
setBuildMRForksNotMirror
@DataBoundSetter public void setBuildMRForksNotMirror(boolean buildMRForksNotMirror) Setter for stapler to set the buildMRForksNotMirror -
decorateContext
protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) - Overrides:
decorateContext
in classjenkins.scm.api.trait.SCMSourceTrait
-
includeCategory
public boolean includeCategory(@NonNull jenkins.scm.api.SCMHeadCategory category) - Overrides:
includeCategory
in classjenkins.scm.api.trait.SCMSourceTrait
-