Class IgnoreCommitterStrategy

java.lang.Object
hudson.model.AbstractDescribableImpl<jenkins.branch.BranchBuildStrategy>
jenkins.branch.BranchBuildStrategy
au.com.versent.jenkins.plugins.ignoreCommitterStrategy.IgnoreCommitterStrategy
All Implemented Interfaces:
ExtensionPoint, Describable<jenkins.branch.BranchBuildStrategy>

public class IgnoreCommitterStrategy extends jenkins.branch.BranchBuildStrategy
  • Constructor Details

    • IgnoreCommitterStrategy

      @DataBoundConstructor public IgnoreCommitterStrategy(String ignoredAuthors, Boolean allowBuildIfNotExcludedAuthor)
  • Method Details

    • getIgnoredAuthors

      public String getIgnoredAuthors()
      Get comma-separated list of ignored commit authors
      Returns:
      comma separated list of ignored authors
    • getAllowBuildIfNotExcludedAuthor

      public Boolean getAllowBuildIfNotExcludedAuthor()
      Determine if build is allowed if at least one author in the changeset is not excluded
      Returns:
      indicates if build should be triggered if one of the authors is not in the exclude list
    • isAutomaticBuild

      public boolean isAutomaticBuild(@NonNull jenkins.scm.api.SCMSource source, @NonNull jenkins.scm.api.SCMHead head, @NonNull jenkins.scm.api.SCMRevision currRevision, @CheckForNull jenkins.scm.api.SCMRevision lastBuiltRevision, @CheckForNull jenkins.scm.api.SCMRevision lastSeenRevision, @NonNull TaskListener listener)
      Determine if build is required by checking if any of the commit authors is in the ignore list and/or if changesets with at least one non excluded author are allowed

      Specified by:
      isAutomaticBuild in class jenkins.branch.BranchBuildStrategy
      Returns:
      true if changeset does not have commits by ignored users or at least one user is not excluded and {allowBuildIfNotExcludedAuthor} is true