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) |
GitHubAccessor(String username,
String password,
String apiBaseUrl) |
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 @NotNull String url, @NotNull @NotNull String payload, @Nullable @Nullable com.google.common.collect.Multimap<String,String> headers) throws IOException
IOException
protected GitHubAccessor.HttpResponse delete(@NotNull @NotNull String url, @Nullable @Nullable com.google.common.collect.Multimap<String,String> headers) throws IOException
IOException
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.