Class BasePRGHEventSubscriber<T extends TriggerBranchProperty,U>

java.lang.Object
org.jenkinsci.plugins.github.extension.GHEventsSubscriber
com.adobe.jenkins.github_pr_comment_build.BasePRGHEventSubscriber<T,U>
All Implemented Interfaces:
ExtensionPoint
Direct Known Subclasses:
IssueCommentGHEventSubscriber, IssueLabelGHEventSubscriber, PRReviewGHEventSubscriber, PRUpdateGHEventSubscriber

public abstract class BasePRGHEventSubscriber<T extends TriggerBranchProperty,U> extends org.jenkinsci.plugins.github.extension.GHEventsSubscriber
Base subscriber for PR events.
  • Field Details

    • LOGGER

      protected static final Logger LOGGER
      Logger.
    • REPOSITORY_NAME_PATTERN

      protected static final Pattern REPOSITORY_NAME_PATTERN
      Regex pattern for a GitHub repository.
  • Constructor Details

    • BasePRGHEventSubscriber

      public BasePRGHEventSubscriber()
  • Method Details

    • getTriggerClass

      protected abstract Class<T> getTriggerClass()
    • isApplicable

      protected boolean isApplicable(Item item)
      Specified by:
      isApplicable in class org.jenkinsci.plugins.github.extension.GHEventsSubscriber
    • getRepoUrl

      protected String getRepoUrl(net.sf.json.JSONObject json)
    • getChangedRepository

      protected com.cloudbees.jenkins.GitHubRepositoryName getChangedRepository(String repoUrl)
    • postStartJob

      protected void postStartJob(T branchProp, Job<?,?> job, U postStartParam)
      Called after a job is started successfully, may be used for adding reactions or performing other actions.
      Parameters:
      branchProp - the branch property
      job - the job
      postStartParam - an arbitrary parameter
    • checkAndRunJobs

      protected void checkAndRunJobs(com.cloudbees.jenkins.GitHubRepositoryName changedRepository, int pullRequestId, String author, U postStartParam, BiFunction<Job<?,?>,T,Cause> getCauseFunction)