Package net.gleske.scmfilter.impl.trait
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Our descriptor.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionRegexSCMHeadFilterTrait
(String regex) Deprecated.RegexSCMHeadFilterTrait
(String regex, String tagRegex) Stapler constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
decorateContext
(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) getRegex()
Gets the branch regular expression.Gets the tag regular expression.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
-
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.Deprecated constructor kept around for compatibility and migration.- Parameters:
regex
- the regular expression.
-
-
Method Details
-
getRegex
Gets the branch regular expression.- Returns:
- the branch regular expression.
-
getTagRegex
Gets the tag regular expression.- Returns:
- the tag regular expression.
-
decorateContext
protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) - Overrides:
decorateContext
in classjenkins.scm.api.trait.SCMSourceTrait
-