Class TriggerMRCommentTrait
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.TriggerMRCommentTrait
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.scm.api.trait.SCMSourceTrait>
public class TriggerMRCommentTrait
extends jenkins.scm.api.trait.SCMSourceTrait
Allows a GitLab merge request comment to trigger an immediate build based on a comment string.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionTriggerMRCommentTrait
(String commentBody, boolean onlyTrustedMembersCanTrigger) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
decorateContext
(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) The comment body to trigger a new build on.boolean
Allow trigger a new build by trusted members only.Methods inherited from class jenkins.scm.api.trait.SCMSourceTrait
_for, _for, all, applyToBuilder, applyToContext, applyToObserver, decorateBuilder, decorateObserver, getDescriptor, includeCategory, isCategoryEnabled
Methods inherited from class jenkins.scm.api.trait.SCMTrait
asSetList, asSetList, find
-
Constructor Details
-
TriggerMRCommentTrait
@DataBoundConstructor public TriggerMRCommentTrait(String commentBody, boolean onlyTrustedMembersCanTrigger) Constructor.- Parameters:
commentBody
- the comment body to trigger a new build ononlyTrustedMembersCanTrigger
- if true then only trusted members can trigger the job
-
-
Method Details
-
getCommentBody
The comment body to trigger a new build on.- Returns:
- the comment body to use
-
getOnlyTrustedMembersCanTrigger
public boolean getOnlyTrustedMembersCanTrigger()Allow trigger a new build by trusted members only.- Returns:
- true if allow trusted members only
- Since:
- TODO
-
decorateContext
protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) - Overrides:
decorateContext
in classjenkins.scm.api.trait.SCMSourceTrait
-