/** * 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); }
public Set<GHUser> getMembers() throws IOException { return Collections.unmodifiableSet(listMembers().asSet()); }
@Override public PagedSearchIterable<T> withPageSize(int size) { return (PagedSearchIterable<T>)super.withPageSize(size); }
/** * Eagerly walk {@link Iterable} and return the result in a set. */ public Set<T> asSet() { LinkedHashSet<T> r = new LinkedHashSet<T>(); for(PagedIterator<T> i = iterator(); i.hasNext();) { r.addAll(i.nextPage()); } return r; } }
public final PagedIterator<T> iterator() { return _iterator(size); }
/** * Eagerly walk {@link Iterable} and return the result in a list. */ public List<T> asList() { List<T> r = new ArrayList<T>(); for(PagedIterator<T> i = iterator(); i.hasNext();) { r.addAll(i.nextPage()); } return r; }
public final PagedIterator<T> iterator() { return _iterator(size); }
/** * @deprecated use {@link #listMembers()} */ public List<GHUser> getMembers() throws IOException { return listMembers().asList(); }
/** * Eagerly walk {@link Iterable} and return the result in a list. */ public List<T> asList() { List<T> r = new ArrayList<T>(); for(PagedIterator<T> i = iterator(); i.hasNext();) { r.addAll(i.nextPage()); } return r; }
@Override public PagedSearchIterable<T> withPageSize(int size) { return (PagedSearchIterable<T>)super.withPageSize(size); }
public Set<GHUser> getMembers() throws IOException { return Collections.unmodifiableSet(listMembers().asSet()); }
/** * @deprecated * use {@link #listReleases()} */ public List<GHRelease> getReleases() throws IOException { return listReleases().asList(); }
/** * Eagerly walk {@link Iterable} and return the result in a list. */ public List<T> asList() { List<T> r = new ArrayList<T>(); for(PagedIterator<T> i = iterator(); i.hasNext();) { r.addAll(i.nextPage()); } return r; }
private void retrieveRepositoryNames() throws IOException { System.err.println("Retrieving GitHub repository names..."); Cache cache = new Cache(GITHUB_API_CACHE, 20L*1024*1024); // 20 MB cache github = new GitHubBuilder().withConnector(new OkHttp3Connector(new OkUrlFactory(new OkHttpClient.Builder().cache(cache).build()))).withPassword(GITHUB_API_USERNAME, GITHUB_API_PASSWORD).build(); List<String> ret = new ArrayList<>(); for (GHRepository repo : github.getOrganization("jenkinsci").listRepositories().withPageSize(100)) { ret.add(repo.getHtmlUrl().toString()); } Files.write(GITHUB_REPO_LIST.toPath(), ret); }
public Set<GHUser> getMembers() throws IOException { return Collections.unmodifiableSet(listMembers().asSet()); }
/** * 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); }
/** * Eagerly walk {@link Iterable} and return the result in a set. */ public Set<T> asSet() { LinkedHashSet<T> r = new LinkedHashSet<T>(); for(PagedIterator<T> i = iterator(); i.hasNext();) { r.addAll(i.nextPage()); } return r; } }
/** * Obtains all the comments associated with this issue. * * @see #listComments() */ public List<GHIssueComment> getComments() throws IOException { return listComments().asList(); }
/** * Eagerly walk {@link Iterable} and return the result in a set. */ public Set<T> asSet() { LinkedHashSet<T> r = new LinkedHashSet<T>(); for(PagedIterator<T> i = iterator(); i.hasNext();) { r.addAll(i.nextPage()); } return r; } }
/** * @deprecated use {@link #listMembers()} */ public List<GHUser> getMembers() throws IOException { return listMembers().asList(); }