Class MessageExclusion

All Implemented Interfaces:
Describable<GitSCMExtension>

public class MessageExclusion extends GitSCMExtension
GitSCMExtension that ignores commits with specific messages.
Author:
Kanstantsin Shautsou
  • Constructor Details

    • MessageExclusion

      @DataBoundConstructor public MessageExclusion(String excludedMessage)
  • Method Details

    • requiresWorkspaceForPolling

      public boolean requiresWorkspaceForPolling()
      Overrides:
      requiresWorkspaceForPolling in class GitSCMExtension
      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 class GitSCMExtension
      Parameters:
      scm - GitSCM object
      git - GitClient object
      commit - The commit whose exclusion is being tested.
      listener - build log
      buildData - build data to be used
      Returns:
      true to disregard this commit and not trigger a build, regardless of what later GitSCMExtensions say. false to trigger a build from this commit, regardless of what later GitSCMExtensions say. null to allow other GitSCMExtensions to decide.
      Throws:
      IOException - on input or output error
      InterruptedException - when interrupted
      hudson.plugins.git.GitException - on git error