java.lang.Object
hudson.model.AbstractDescribableImpl<GitHubBranchCommitCheck>
com.github.kostyasha.github.integration.branch.events.impl.commitchecks.GitHubBranchCommitCheck
All Implemented Interfaces:
ExtensionPoint, Describable<GitHubBranchCommitCheck>
Direct Known Subclasses:
GitHubBranchCommitMessageCheck

public abstract class GitHubBranchCommitCheck extends AbstractDescribableImpl<GitHubBranchCommitCheck> implements ExtensionPoint
See Also:
  • Constructor Details

    • GitHubBranchCommitCheck

      public GitHubBranchCommitCheck()
  • Method Details

    • getDescriptor

      public GitHubBranchCommitCheckDescriptor getDescriptor()
      Specified by:
      getDescriptor in interface Describable<GitHubBranchCommitCheck>
      Overrides:
      getDescriptor in class AbstractDescribableImpl<GitHubBranchCommitCheck>
    • check

      public abstract GitHubBranchCause check(org.kohsuke.github.GHBranch remoteBranch, GitHubBranchRepository localRepo, org.kohsuke.github.GHCompare.Commit[] commits)
      Check used to determine if some associated commit property, such as the commit message, should prevent a build from being triggered.
      Parameters:
      remoteBranch - current branch state from GH.
      localRepo - local repository state.
      commits - commits commits that occurred between the last known local hash and the current remote.
      Returns:
      GitHubBranchCause instance indicating if the build should be skipped, null otherwise.
    • check

      public GitHubBranchCause check(org.kohsuke.github.GHBranch remoteBranch, GitHubBranchRepository localRepo, org.kohsuke.github.GHCommit commit)
      Check used to determine if some associated commit property, such as the commit message, should prevent a build from being triggered.

      This method is called when the repository is not yet known to the plugin.

      Parameters:
      remoteBranch - current branch state from GH.
      localRepo - local repository state.
      commit - last commit in the remote repository.
      Returns:
      GitHubBranchCause instance indicating if the build should be skipped, null otherwise.
    • doCheck

      protected abstract GitHubBranchCause doCheck(org.kohsuke.github.GHBranch remoteBranch, GitHubBranchRepository localRepo, org.kohsuke.github.GHCommit commit) throws IOException
      Throws:
      IOException