java.lang.Object
org.jenkinsci.plugins.github.pullrequest.utils.JobHelper

public class JobHelper extends Object
Author:
Kanstantsin Shautsou
  • Method Details

    • 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)
      See Also:
      • ParameterizedJobMixIn.getDefaultParametersValues()
    • 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)