public class GitHubHelpers extends Object
| Constructor and Description |
|---|
GitHubHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeIssues(List<org.kohsuke.github.GHIssue> issues) |
static void |
closeOpenUpdateBotIssuesAndPullRequests(String prLabel,
List<LocalRepository> repositories) |
static void |
closePullRequests(List<org.kohsuke.github.GHPullRequest> pullRequests) |
static void |
deleteUpdateBotBranches(List<LocalRepository> localRepositories) |
static org.kohsuke.github.GHRepository |
getGitHubRepository(LocalRepository repository)
Returns the underlying GitHub repository if this repository is on github
|
static org.kohsuke.github.GHCommitStatus |
getLastCommitStatus(org.kohsuke.github.GHRepository repository,
org.kohsuke.github.GHPullRequest pullRequest) |
static org.kohsuke.github.GHPerson |
getOrganisationOrUser(org.kohsuke.github.GitHub github,
String orgName) |
static boolean |
hasLabel(Collection<org.kohsuke.github.GHLabel> labels,
String label) |
static boolean |
isMergeable(org.kohsuke.github.GHPullRequest pullRequest) |
static <T> T |
retryGithub(Callable<T> callable) |
static <T> T |
retryGithub(Callable<T> callable,
int retries,
long timeout)
Allow automatic retries when timeout exceptions happen
|
static Boolean |
waitForPullRequestToHaveMergable(org.kohsuke.github.GHPullRequest pullRequest,
long sleepMS,
long maximumTimeMS) |
public static void closeOpenUpdateBotIssuesAndPullRequests(String prLabel, List<LocalRepository> repositories)
public static void closeIssues(List<org.kohsuke.github.GHIssue> issues) throws IOException
IOExceptionpublic static void closePullRequests(List<org.kohsuke.github.GHPullRequest> pullRequests) throws IOException
IOExceptionpublic static org.kohsuke.github.GHRepository getGitHubRepository(LocalRepository repository)
public static boolean hasLabel(Collection<org.kohsuke.github.GHLabel> labels, String label)
public static boolean isMergeable(org.kohsuke.github.GHPullRequest pullRequest)
throws IOException
IOExceptionpublic static void deleteUpdateBotBranches(List<LocalRepository> localRepositories) throws IOException
IOExceptionpublic static org.kohsuke.github.GHPerson getOrganisationOrUser(org.kohsuke.github.GitHub github,
String orgName)
public static org.kohsuke.github.GHCommitStatus getLastCommitStatus(org.kohsuke.github.GHRepository repository,
org.kohsuke.github.GHPullRequest pullRequest)
throws IOException
IOExceptionpublic static <T> T retryGithub(Callable<T> callable) throws IOException
IOExceptionpublic static <T> T retryGithub(Callable<T> callable, int retries, long timeout) throws IOException
IOExceptionpublic static Boolean waitForPullRequestToHaveMergable(org.kohsuke.github.GHPullRequest pullRequest, long sleepMS, long maximumTimeMS) throws IOException
IOExceptionCopyright © 2076–2017 Red Hat. All rights reserved.