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.
  • Constructor Details

    • TriggerMRCommentTrait

      @DataBoundConstructor public TriggerMRCommentTrait(String commentBody, boolean onlyTrustedMembersCanTrigger)
      Constructor.
      Parameters:
      commentBody - the comment body to trigger a new build on
      onlyTrustedMembersCanTrigger - if true then only trusted members can trigger the job
  • Method Details

    • 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 class jenkins.scm.api.trait.SCMSourceTrait