Class 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 Detail

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