Class MessageExclusion
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<GitSCMExtension>
-
- hudson.plugins.git.extensions.GitSCMExtension
-
- hudson.plugins.git.extensions.impl.MessageExclusion
-
- All Implemented Interfaces:
Describable<GitSCMExtension>
public class MessageExclusion extends GitSCMExtension
GitSCMExtension
that ignores commits with specific messages.- Author:
- Kanstantsin Shautsou
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MessageExclusion.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description MessageExclusion(String excludedMessage)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExcludedMessage()
Boolean
isRevExcluded(GitSCM scm, org.jenkinsci.plugins.gitclient.GitClient git, GitChangeSet commit, TaskListener listener, BuildData buildData)
Given a commit found during polling, check whether it should be disregarded.boolean
requiresWorkspaceForPolling()
-
Methods inherited from class hudson.plugins.git.extensions.GitSCMExtension
beforeCheckout, beforeCheckout, decorate, decorateCheckoutCommand, decorateCheckoutCommand, decorateCloneCommand, decorateCloneCommand, decorateFetchCommand, decorateFetchCommand, decorateMergeCommand, decorateMergeCommand, decorateRevisionToBuild, decorateRevisionToBuild, determineSupportForJGit, enableMultipleRevisionDetection, getDescriptor, getRequiredClient, getWorkingDirectory, getWorkingDirectory, onCheckoutCompleted, onCheckoutCompleted, onClean, populateEnvironmentVariables
-
-
-
-
Constructor Detail
-
MessageExclusion
@DataBoundConstructor public MessageExclusion(String excludedMessage)
-
-
Method Detail
-
requiresWorkspaceForPolling
public boolean requiresWorkspaceForPolling()
- Overrides:
requiresWorkspaceForPolling
in classGitSCMExtension
- Returns:
true
when this extension has a requirement to get a workspace during polling, typically as it has to check for incoming changes, not just remote HEAD.
-
getExcludedMessage
public String getExcludedMessage()
-
isRevExcluded
@CheckForNull public Boolean isRevExcluded(GitSCM scm, org.jenkinsci.plugins.gitclient.GitClient git, GitChangeSet commit, TaskListener listener, BuildData buildData) throws IOException, InterruptedException, hudson.plugins.git.GitException
Description copied from class:GitSCMExtension
Given a commit found during polling, check whether it should be disregarded.- Overrides:
isRevExcluded
in classGitSCMExtension
- Parameters:
scm
- GitSCM objectgit
- GitClient objectcommit
- The commit whose exclusion is being tested.listener
- build logbuildData
- build data to be used- Returns:
- true to disregard this commit and not trigger a build, regardless of what later
GitSCMExtension
s say. false to trigger a build from this commit, regardless of what laterGitSCMExtension
s say. null to allow otherGitSCMExtension
s to decide. - Throws:
IOException
- on input or output errorInterruptedException
- when interruptedhudson.plugins.git.GitException
- on git error
-
-