Class GitHubPRDecisionContext
- java.lang.Object
-
- com.github.kostyasha.github.integration.generic.GitHubDecisionContext<GitHubPREvent,GitHubPRCause>
-
- com.github.kostyasha.github.integration.generic.GitHubPRDecisionContext
-
public class GitHubPRDecisionContext extends GitHubDecisionContext<GitHubPREvent,GitHubPRCause>
- Author:
- Kanstantsin Shautsou
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GitHubPRDecisionContext.Builder
-
Constructor Summary
Constructors Modifier Constructor Description protected
GitHubPRDecisionContext(org.kohsuke.github.GHPullRequest remotePR, GitHubPRPullRequest localPR, GitHubPRRepository localRepo, GitHubPRUserRestriction prUserRestriction, GitHubSCMSource source, GitHubPRHandler prHandler, GitHubPRTrigger prTrigger, TaskListener listener)
protected
GitHubPRDecisionContext(org.kohsuke.github.GHPullRequest remotePR, GitHubPRPullRequest localPR, GitHubPRUserRestriction prUserRestriction, GitHubSCMSource source, GitHubPRHandler prHandler, GitHubPRTrigger prTrigger, TaskListener listener)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GitHubPRCause
checkEvent(GitHubPREvent event)
GitHubPRHandler
getHandler()
GitHubPRPullRequest
getLocalPR()
PR state from last run saved in jenkins.GitHubPRRepository
getLocalRepo()
GitHubPRTrigger
getPrTrigger()
Deprecated.GitHubPRUserRestriction
getPrUserRestriction()
org.kohsuke.github.GHPullRequest
getRemotePR()
remotePR current PR state fetched from GH remotePRs are always existing on gh.GitHubPRTrigger
getTrigger()
GitHubPRCause
newCause(String reason, boolean skip)
static GitHubPRDecisionContext.Builder
newGitHubPRDecisionContext()
-
Methods inherited from class com.github.kostyasha.github.integration.generic.GitHubDecisionContext
getListener, getRemoteRepository, getScmSource
-
-
-
-
Constructor Detail
-
GitHubPRDecisionContext
protected GitHubPRDecisionContext(@CheckForNull org.kohsuke.github.GHPullRequest remotePR, @CheckForNull GitHubPRPullRequest localPR, @CheckForNull GitHubPRRepository localRepo, @CheckForNull GitHubPRUserRestriction prUserRestriction, GitHubSCMSource source, GitHubPRHandler prHandler, GitHubPRTrigger prTrigger, @NonNull TaskListener listener)
-
GitHubPRDecisionContext
@Deprecated protected GitHubPRDecisionContext(@CheckForNull org.kohsuke.github.GHPullRequest remotePR, @CheckForNull GitHubPRPullRequest localPR, @CheckForNull GitHubPRUserRestriction prUserRestriction, GitHubSCMSource source, GitHubPRHandler prHandler, GitHubPRTrigger prTrigger, @NonNull TaskListener listener)
Deprecated.
-
-
Method Detail
-
getRemotePR
@NonNull public org.kohsuke.github.GHPullRequest getRemotePR()
remotePR current PR state fetched from GH remotePRs are always existing on gh.
-
getLocalPR
@CheckForNull public GitHubPRPullRequest getLocalPR()
PR state from last run saved in jenkins. null when not exist before
-
getLocalRepo
@CheckForNull public GitHubPRRepository getLocalRepo()
-
getPrUserRestriction
@CheckForNull public GitHubPRUserRestriction getPrUserRestriction()
-
getTrigger
public GitHubPRTrigger getTrigger()
- Overrides:
getTrigger
in classGitHubDecisionContext<GitHubPREvent,GitHubPRCause>
-
getHandler
public GitHubPRHandler getHandler()
- Overrides:
getHandler
in classGitHubDecisionContext<GitHubPREvent,GitHubPRCause>
-
getPrTrigger
@CheckForNull @Deprecated public GitHubPRTrigger getPrTrigger()
Deprecated.
-
checkEvent
public GitHubPRCause checkEvent(GitHubPREvent event) throws IOException
- Specified by:
checkEvent
in classGitHubDecisionContext<GitHubPREvent,GitHubPRCause>
- Throws:
IOException
-
newCause
public GitHubPRCause newCause(String reason, boolean skip)
- Specified by:
newCause
in classGitHubDecisionContext<GitHubPREvent,GitHubPRCause>
-
newGitHubPRDecisionContext
@NonNull public static GitHubPRDecisionContext.Builder newGitHubPRDecisionContext()
-
-