Class PullRequestToCauseConverter
- java.lang.Object
-
- org.jenkinsci.plugins.github.pullrequest.trigger.check.PullRequestToCauseConverter
-
- All Implemented Interfaces:
com.google.common.base.Function<org.kohsuke.github.GHPullRequest,GitHubPRCause>
,Function<org.kohsuke.github.GHPullRequest,GitHubPRCause>
public class PullRequestToCauseConverter extends Object implements com.google.common.base.Function<org.kohsuke.github.GHPullRequest,GitHubPRCause>
- Author:
- lanwen (Merkushev Kirill)
-
-
Constructor Summary
Constructors Constructor Description PullRequestToCauseConverter(GitHubPRRepository localRepo, TaskListener listener, GitHubSCMSource source, GitHubPRHandler prHandler)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GitHubPRCause
apply(org.kohsuke.github.GHPullRequest remotePR)
TODO migrate to java8 and cleanup.List<GitHubPREvent>
getEvents()
static PullRequestToCauseConverter
toGitHubPRCause(GitHubPRRepository localRepo, TaskListener listener, GitHubPRHandler prHandler, GitHubSCMSource source)
static PullRequestToCauseConverter
toGitHubPRCause(GitHubPRRepository localRepo, TaskListener listener, GitHubPRTrigger trigger)
-
-
-
Constructor Detail
-
PullRequestToCauseConverter
public PullRequestToCauseConverter(@NonNull GitHubPRRepository localRepo, @NonNull TaskListener listener, @NonNull GitHubSCMSource source, @NonNull GitHubPRHandler prHandler)
-
-
Method Detail
-
toGitHubPRCause
public static PullRequestToCauseConverter toGitHubPRCause(@NonNull GitHubPRRepository localRepo, @NonNull TaskListener listener, @NonNull GitHubPRTrigger trigger)
-
toGitHubPRCause
public static PullRequestToCauseConverter toGitHubPRCause(@NonNull GitHubPRRepository localRepo, @NonNull TaskListener listener, @NonNull GitHubPRHandler prHandler, @NonNull GitHubSCMSource source)
-
apply
@CheckForNull public GitHubPRCause apply(org.kohsuke.github.GHPullRequest remotePR)
TODO migrate to java8 and cleanup.- Specified by:
apply
in interfacecom.google.common.base.Function<org.kohsuke.github.GHPullRequest,GitHubPRCause>
- Specified by:
apply
in interfaceFunction<org.kohsuke.github.GHPullRequest,GitHubPRCause>
- Returns:
- only real trigger cause if matched trigger (not skip) event found for this remotePr.
-
getEvents
public List<GitHubPREvent> getEvents()
-
-