Class GitHubHelper


  • public class GitHubHelper
    extends Object
    Various utility methods to obtain clients, repos and pull request scm heads from Jobs
    Author:
    Aaron Whiteside
    • Method Detail

      • isAuthorized

        public static Boolean isAuthorized​(@Nonnull
                                           Job<?,​?> job,
                                           @Nonnull
                                           String User)
      • getRepositoryId

        public static org.eclipse.egit.github.core.RepositoryId getRepositoryId​(@Nonnull
                                                                                Job<?,​?> job)
      • getPullRequest

        public static org.jenkinsci.plugins.github_branch_source.PullRequestSCMHead getPullRequest​(@Nonnull
                                                                                                   Job job)
                                                                                            throws Exception
        Throws:
        Exception
      • userToLogin

        public static String userToLogin​(org.eclipse.egit.github.core.User user)
      • getJob

        public static Job getJob​(String jobId)