Class JobHelper
- java.lang.Object
-
- org.jenkinsci.plugins.github.pullrequest.utils.JobHelper
-
public class JobHelper extends Object
- Author:
- Kanstantsin Shautsou
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addComment(int id, String comment, Run<?,?> run, TaskListener listener)
static org.kohsuke.github.GHCommitState
getCommitState(Run<?,?> run, org.kohsuke.github.GHCommitState unstableAs)
static List<ParameterValue>
getDefaultParametersValues(Job<?,?> job)
static org.kohsuke.github.GHIssue
getGhIssue(Run<?,?> run)
static org.kohsuke.github.GHIssue
getGhPullRequest(Run<?,?> run)
static org.kohsuke.github.GHRepository
getGhRepositoryFromPRTrigger(Run<?,?> run)
static List<CauseOfInterruption>
getInterruptCauses(Executor executor)
static Result
getInterruptStatus(Executor executor)
static int
getPRNumberFromPRCause(Run<?,?> run)
static <T extends Cause>
TghCauseFromRun(Run<?,?> run, Class<T> tClass)
matrix-project requires special extraction.static GitHubPRCause
ghPRCauseFromRun(Run<?,?> run)
static GitHubPRTrigger
ghPRTriggerFromJob(Job<?,?> job)
static GitHubPRTrigger
ghPRTriggerFromRun(Run<?,?> run)
static boolean
rebuild(Run<?,?> run)
static <T extends Trigger>
TtriggerFrom(Job<?,?> job, Class<T> tClass)
support matrix plugin.
-
-
-
Method Detail
-
ghPRTriggerFromRun
@CheckForNull public static GitHubPRTrigger ghPRTriggerFromRun(Run<?,?> run)
-
ghPRTriggerFromJob
@CheckForNull public static GitHubPRTrigger ghPRTriggerFromJob(Job<?,?> job)
-
triggerFrom
@CheckForNull public static <T extends Trigger> T triggerFrom(Job<?,?> job, Class<T> tClass)
support matrix plugin.- See Also:
JobInfoHelpers.triggerFrom(hudson.model.Job, java.lang.Class)
-
ghPRCauseFromRun
@CheckForNull public static GitHubPRCause ghPRCauseFromRun(Run<?,?> run)
-
ghCauseFromRun
@CheckForNull public static <T extends Cause> T ghCauseFromRun(Run<?,?> run, Class<T> tClass)
matrix-project requires special extraction.
-
getInterruptStatus
public static Result getInterruptStatus(Executor executor) throws IllegalAccessException
- Throws:
IllegalAccessException
-
getInterruptCauses
public static List<CauseOfInterruption> getInterruptCauses(Executor executor) throws IllegalAccessException
- Throws:
IllegalAccessException
-
getDefaultParametersValues
public static List<ParameterValue> getDefaultParametersValues(Job<?,?> job)
-
rebuild
public static boolean rebuild(Run<?,?> run)
-
getGhRepositoryFromPRTrigger
public static org.kohsuke.github.GHRepository getGhRepositoryFromPRTrigger(Run<?,?> run) throws IOException
- Throws:
IOException
-
getPRNumberFromPRCause
public static int getPRNumberFromPRCause(Run<?,?> run) throws AbortException
- Throws:
AbortException
-
getGhIssue
public static org.kohsuke.github.GHIssue getGhIssue(Run<?,?> run) throws IOException
- Throws:
IOException
-
getGhPullRequest
public static org.kohsuke.github.GHIssue getGhPullRequest(Run<?,?> run) throws IOException
- Throws:
IOException
-
addComment
public static void addComment(int id, String comment, Run<?,?> run, TaskListener listener)
-
getCommitState
public static org.kohsuke.github.GHCommitState getCommitState(Run<?,?> run, org.kohsuke.github.GHCommitState unstableAs)
-
-