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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkAndRunJobs
(com.cloudbees.jenkins.GitHubRepositoryName changedRepository, int pullRequestId, String author, U postStartParam, BiFunction<Job<?, ?>, T, Cause> getCauseFunction) protected com.cloudbees.jenkins.GitHubRepositoryName
getChangedRepository
(String repoUrl) protected String
getRepoUrl
(net.sf.json.JSONObject json) protected boolean
isApplicable
(Item item) 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.Methods inherited from class org.jenkinsci.plugins.github.extension.GHEventsSubscriber
all, events, extractEvents, isApplicable, isApplicableFor, isApplicableFor, isInterestedIn, onEvent, onEvent, processEvent, processEvent
-
Field Details
-
LOGGER
Logger. -
REPOSITORY_NAME_PATTERN
Regex pattern for a GitHub repository.
-
-
Constructor Details
-
BasePRGHEventSubscriber
public BasePRGHEventSubscriber()
-
-
Method Details
-
getTriggerClass
-
isApplicable
- Specified by:
isApplicable
in classorg.jenkinsci.plugins.github.extension.GHEventsSubscriber
-
getRepoUrl
-
getChangedRepository
-
postStartJob
Called after a job is started successfully, may be used for adding reactions or performing other actions.- Parameters:
branchProp
- the branch propertyjob
- the jobpostStartParam
- an arbitrary parameter
-
checkAndRunJobs
-