Class RegexSCMHeadFilterTrait

java.lang.Object
hudson.model.AbstractDescribableImpl<T>
jenkins.scm.api.trait.SCMTrait<jenkins.scm.api.trait.SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTrait
net.gleske.scmfilter.impl.trait.RegexSCMHeadFilterTrait
All Implemented Interfaces:
ExtensionPoint, Describable<jenkins.scm.api.trait.SCMSourceTrait>

public class RegexSCMHeadFilterTrait extends jenkins.scm.api.trait.SCMSourceTrait
Decorates a SCMSource with a SCMHeadPrefilter that excludes SCMHead instances with names that do not match a user supplied regular expression.
Since:
0.1
  • Constructor Details

    • RegexSCMHeadFilterTrait

      @DataBoundConstructor public RegexSCMHeadFilterTrait(@NonNull String regex, @NonNull String tagRegex)
      Stapler constructor.
      Parameters:
      regex - the branch regular expression.
      tagRegex - the tag regular expression.
    • RegexSCMHeadFilterTrait

      @Deprecated public RegexSCMHeadFilterTrait(@NonNull String regex)
      Deprecated.
      Deprecated constructor kept around for compatibility and migration.
      Parameters:
      regex - the regular expression.
  • Method Details

    • getRegex

      @NonNull public String getRegex()
      Gets the branch regular expression.
      Returns:
      the branch regular expression.
    • getTagRegex

      @NonNull public String getTagRegex()
      Gets the tag regular expression.
      Returns:
      the tag regular expression.
    • decorateContext

      protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?,?> context)
      Overrides:
      decorateContext in class jenkins.scm.api.trait.SCMSourceTrait