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 Modifier and Type Class Description static class
TriggerMRCommentTrait.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description TriggerMRCommentTrait(String commentBody, boolean onlyTrustedMembersCanTrigger)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
decorateContext(jenkins.scm.api.trait.SCMSourceContext<?,?> context)
String
getCommentBody()
The comment body to trigger a new build on.boolean
getOnlyTrustedMembersCanTrigger()
Allow trigger a new build by trusted members only.
-
-
-
Constructor Detail
-
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 Detail
-
getCommentBody
public String 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
-
-