public class GitHubHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CREDENTIALS_ID_NOT_EXISTS |
static String |
CREDENTIALS_LOGIN_INVALID |
static String |
DEFAULT_GITHUB_API_URL |
static String |
GIT_SCM_COMMIT_ENV_NAME |
static String |
INVALID_COMMIT |
static String |
INVALID_REPO |
static String |
NULL_CREDENTIALS_ID |
static String |
UNABLE_TO_INFER_COMMIT |
static String |
UNABLE_TO_INFER_CREDENTIALS_ID |
static String |
UNABLE_TO_INFER_DATA |
Constructor and Description |
---|
GitHubHelper() |
Modifier and Type | Method and Description |
---|---|
static org.kohsuke.github.GHCommit |
getCommitIfValid(String credentialsId,
String gitApiUrl,
Proxy proxy,
String account,
String repo,
String sha,
hudson.model.Item context) |
static org.kohsuke.github.GitHub |
getGitHubIfValid(String credentialsId,
String gitApiUrl,
Proxy proxy,
hudson.model.Item context) |
static org.kohsuke.github.GHRepository |
getRepoIfValid(String credentialsId,
String gitApiUrl,
Proxy proxy,
String account,
String repo,
hudson.model.Item context) |
static String |
inferBuildAccount(hudson.model.Run<?,?> run) |
static String |
inferBuildCommitSHA1(hudson.model.Run<?,?> run) |
static String |
inferBuildCredentialsId(hudson.model.Run<?,?> run) |
static String |
inferBuildRepo(hudson.model.Run<?,?> run) |
static hudson.util.FormValidation |
testApiConnection(String credentialsId,
String gitApiUrl,
hudson.model.Item context) |
public static final String DEFAULT_GITHUB_API_URL
public static final String CREDENTIALS_ID_NOT_EXISTS
public static final String NULL_CREDENTIALS_ID
public static final String CREDENTIALS_LOGIN_INVALID
public static final String INVALID_REPO
public static final String INVALID_COMMIT
public static final String UNABLE_TO_INFER_DATA
public static final String UNABLE_TO_INFER_COMMIT
public static final String UNABLE_TO_INFER_CREDENTIALS_ID
public static final String GIT_SCM_COMMIT_ENV_NAME
public static org.kohsuke.github.GitHub getGitHubIfValid(String credentialsId, @Nonnull String gitApiUrl, Proxy proxy, hudson.model.Item context) throws IOException
IOException
public static org.kohsuke.github.GHRepository getRepoIfValid(String credentialsId, String gitApiUrl, Proxy proxy, String account, String repo, hudson.model.Item context) throws IOException
IOException
public static org.kohsuke.github.GHCommit getCommitIfValid(String credentialsId, String gitApiUrl, Proxy proxy, String account, String repo, String sha, hudson.model.Item context) throws IOException
IOException
public static String inferBuildRepo(hudson.model.Run<?,?> run) throws IOException
IOException
public static String inferBuildAccount(hudson.model.Run<?,?> run) throws IOException
IOException
public static String inferBuildCommitSHA1(hudson.model.Run<?,?> run) throws IOException
IOException
public static String inferBuildCredentialsId(hudson.model.Run<?,?> run)
Copyright © 2016–2019. All rights reserved.