/** * Gets the last status of this commit, which is what gets shown in the UI. */ public GHCommitStatus getLastCommitStatus(String sha1) throws IOException { List<GHCommitStatus> v = listCommitStatuses(sha1).asList(); return v.isEmpty() ? null : v.get(0); }
/** * @deprecated use {@link #listMembers()} */ public List<GHUser> getMembers() throws IOException { return listMembers().asList(); }
/** * @deprecated * use {@link #listReleases()} */ public List<GHRelease> getReleases() throws IOException { return listReleases().asList(); }
/** * @deprecated use {@link #listMembers()} */ public List<GHUser> getMembers() throws IOException { return listMembers().asList(); }
/** * Obtains all the comments associated with this issue. * * @see #listComments() */ public List<GHIssueComment> getComments() throws IOException { return listComments().asList(); }
/** * Gets the last status of this commit, which is what gets shown in the UI. */ public GHCommitStatus getLastCommitStatus(String sha1) throws IOException { List<GHCommitStatus> v = listCommitStatuses(sha1).asList(); return v.isEmpty() ? null : v.get(0); }
/** * @deprecated use {@link #listMembers()} */ public List<GHUser> getMembers() throws IOException { return listMembers().asList(); }
/** * @deprecated * use {@link #listReleases()} */ public List<GHRelease> getReleases() throws IOException { return listReleases().asList(); }
/** * Retrieves all the pull requests of a particular state. * * @see #listPullRequests(GHIssueState) */ public List<GHPullRequest> getPullRequests(GHIssueState state) throws IOException { return listPullRequests(state).asList(); }
public List<GHTeam> listTeams() { if (this.teams == null) { try { this.teams = organization.listTeams().asList(); } catch (Throwable t) { logger.warn("No teams found for organization '{}'.", organization.getLogin()); this.teams = Collections.<GHTeam>emptyList(); } } return this.teams; }
public List<GHRepository.Contributor> listContributors() { if (this.contributors == null) { try { this.contributors = repository.listContributors().asList(); } catch (Throwable t) { logger.warn("No contributors found for project '{}' of organization '{}'.", repository.getName(), organization.getLogin()); this.contributors = Collections.<GHRepository.Contributor>emptyList(); } } return this.contributors; }
public List<GHTag> listTags() { if (this.tags == null) { try { this.tags = repository.listTags().asList(); } catch (Throwable t) { logger.warn("No tags found for project '{}' of organization '{}'.", repository.getName(), organization.getLogin()); this.tags = Collections.<GHTag>emptyList(); } } return this.tags; }
/** * Lists the users who are following this user. */ @WithBridgeMethods(Set.class) public GHPersonSet<GHUser> getFollowers() throws IOException { return new GHPersonSet<GHUser>(listFollowers().asList()); }
/** * Lists the users that this user is following */ @WithBridgeMethods(Set.class) public GHPersonSet<GHUser> getFollows() throws IOException { return new GHPersonSet<GHUser>(listFollows().asList()); }
/** * Gets the collaborators on this repository. * This set always appear to include the owner. */ @WithBridgeMethods(Set.class) public GHPersonSet<GHUser> getCollaborators() throws IOException { return new GHPersonSet<GHUser>(listCollaborators().asList()); }
/** * Retrieves all the pull requests of a particular state. * * @see #listPullRequests(GHIssueState) */ public List<GHPullRequest> getPullRequests(GHIssueState state) throws IOException { return queryPullRequests().state(state).list().asList(); }
/** * Retrieves all the pull requests of a particular state. * * @see #listPullRequests(GHIssueState) */ public List<GHPullRequest> getPullRequests(GHIssueState state) throws IOException { return queryPullRequests().state(state).list().asList(); }
/** * Lists the users who are following this user. */ @WithBridgeMethods(Set.class) public GHPersonSet<GHUser> getFollowers() throws IOException { return new GHPersonSet<GHUser>(listFollowers().asList()); }
/** * Lists the users that this user is following */ @WithBridgeMethods(Set.class) public GHPersonSet<GHUser> getFollows() throws IOException { return new GHPersonSet<GHUser>(listFollows().asList()); }
@Override public List<Repository> getRepositories(String accessToken, String organizationName) throws IOException, ServiceException { GitHub gitHub = GitHub.connectUsingOAuth(accessToken); GHPerson person = StringUtils.isBlank(organizationName) ? gitHub.getMyself() : gitHub.getOrganization(organizationName); return person.listRepositories().asList().stream().map(repository -> { Repository repo = new Repository(repository.getName()); repo.setPrivate(repository.isPrivate()); repo.setUrl(repository.getHtmlUrl().toString()); return repo; }).collect(Collectors.toList()); }