public class GitHubAccessor extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GitHubAccessor.GitHubException |
protected static class |
GitHubAccessor.HttpResponse |
Constructor and Description |
---|
GitHubAccessor(String username,
String password) |
Modifier and Type | Method and Description |
---|---|
boolean |
commentOnCommit(String commitId,
VcsRepositoryData repositoryData,
String message) |
protected GitHubAccessor.HttpResponse |
delete(String url,
com.google.common.collect.Multimap<String,String> headers) |
void |
deleteComment(String repo,
String commentId) |
Iterable<String> |
getAccessibleRepositories() |
Map<String,Iterable<String>> |
getAccessibleRepositoriesAndBranches() |
Iterable<String> |
getBranches(String userRepo) |
List<String> |
getCommentIds(String repo,
String commitId) |
List<String> |
getCommits(String repo) |
Iterable<String> |
getOrganisationRepositories(String org) |
protected GitHubAccessor.HttpResponse |
getStringFromUrl(String url)
Get a string from a given URL.
|
Iterable<String> |
getUserOrganisations() |
Iterable<String> |
getUserRepositories() |
protected GitHubAccessor.HttpResponse |
post(String url,
String payload,
com.google.common.collect.Multimap<String,String> headers) |
public Iterable<String> getAccessibleRepositories() throws IOException, GitHubAccessor.GitHubException
public Map<String,Iterable<String>> getAccessibleRepositoriesAndBranches() throws IOException, GitHubAccessor.GitHubException
public Iterable<String> getBranches(String userRepo) throws IOException, GitHubAccessor.GitHubException
public Iterable<String> getUserOrganisations() throws IOException, GitHubAccessor.GitHubException
public Iterable<String> getUserRepositories() throws IOException, GitHubAccessor.GitHubException
public Iterable<String> getOrganisationRepositories(String org) throws IOException, GitHubAccessor.GitHubException
public boolean commentOnCommit(String commitId, VcsRepositoryData repositoryData, String message) throws RepositoryException
RepositoryException
public List<String> getCommits(String repo) throws IOException, GitHubAccessor.GitHubException
public List<String> getCommentIds(String repo, String commitId) throws IOException, GitHubAccessor.GitHubException
public void deleteComment(String repo, String commentId) throws IOException
IOException
protected GitHubAccessor.HttpResponse getStringFromUrl(String url) throws IOException
url
- url to GET from.IOException
- if a problem occurred in the IO layer.protected GitHubAccessor.HttpResponse post(@NotNull String url, @NotNull String payload, @Nullable com.google.common.collect.Multimap<String,String> headers) throws IOException
IOException
protected GitHubAccessor.HttpResponse delete(@NotNull String url, @Nullable com.google.common.collect.Multimap<String,String> headers) throws IOException
IOException
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.