Skip to content

Commit

Permalink
Merge pull request #295 from jglick/pageSize
Browse files Browse the repository at this point in the history
Use maximum permitted page size
  • Loading branch information
kohsuke authored Oct 24, 2016
2 parents 8b34696 + 38983df commit 290d0b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHOrganization.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public GHTeam createTeam(String name, Permission p, GHRepository... repositories
*/
public List<GHRepository> getRepositoriesWithOpenPullRequests() throws IOException {
List<GHRepository> r = new ArrayList<GHRepository>();
for (GHRepository repository : listRepositories()) {
for (GHRepository repository : listRepositories(100)) {
repository.wrap(root);
List<GHPullRequest> pullRequests = repository.getPullRequests(GHIssueState.OPEN);
if (pullRequests.size() > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/kohsuke/github/GHPerson.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected synchronized void populate() throws IOException {
*/
public synchronized Map<String,GHRepository> getRepositories() throws IOException {
Map<String,GHRepository> repositories = new TreeMap<String, GHRepository>();
for (GHRepository r : listRepositories()) {
for (GHRepository r : listRepositories(100)) {
repositories.put(r.getName(),r);
}
return Collections.unmodifiableMap(repositories);
Expand Down

0 comments on commit 290d0b2

Please sign in to comment.