diff --git a/src/main/java/org/kohsuke/github/GHOrganization.java b/src/main/java/org/kohsuke/github/GHOrganization.java index f174decf2f..d05e441223 100644 --- a/src/main/java/org/kohsuke/github/GHOrganization.java +++ b/src/main/java/org/kohsuke/github/GHOrganization.java @@ -269,7 +269,7 @@ protected void wrapUp(GHEventInfo[] page) { public PagedIterable listRepositories(final int pageSize) { return new PagedIterable() { public PagedIterator _iterator(int pageSize) { - return new PagedIterator(root.retrieve().asIterator("/orgs/" + login + "/repos?per_page=" + pageSize, GHRepository[].class, pageSize)) { + return new PagedIterator(root.retrieve().asIterator("/orgs/" + login + "/repos", GHRepository[].class, pageSize)) { @Override protected void wrapUp(GHRepository[] page) { for (GHRepository c : page) @@ -277,7 +277,7 @@ protected void wrapUp(GHRepository[] page) { } }; } - }; + }.withPageSize(pageSize); } /** diff --git a/src/main/java/org/kohsuke/github/GHPerson.java b/src/main/java/org/kohsuke/github/GHPerson.java index 87cb8efaa7..b1be225965 100644 --- a/src/main/java/org/kohsuke/github/GHPerson.java +++ b/src/main/java/org/kohsuke/github/GHPerson.java @@ -81,7 +81,7 @@ public PagedIterable listRepositories() { public PagedIterable listRepositories(final int pageSize) { return new PagedIterable() { public PagedIterator _iterator(int pageSize) { - return new PagedIterator(root.retrieve().asIterator("/users/" + login + "/repos?per_page=" + pageSize, GHRepository[].class, pageSize)) { + return new PagedIterator(root.retrieve().asIterator("/users/" + login + "/repos", GHRepository[].class, pageSize)) { @Override protected void wrapUp(GHRepository[] page) { for (GHRepository c : page) @@ -89,7 +89,7 @@ protected void wrapUp(GHRepository[] page) { } }; } - }; + }.withPageSize(pageSize); } /** @@ -108,7 +108,7 @@ protected void wrapUp(GHRepository[] page) { public synchronized Iterable> iterateRepositories(final int pageSize) { return new Iterable>() { public Iterator> iterator() { - final Iterator pager = root.retrieve().asIterator("/users/" + login + "/repos?per_page="+pageSize,GHRepository[].class, pageSize); + final Iterator pager = root.retrieve().asIterator("/users/" + login + "/repos",GHRepository[].class, pageSize); return new Iterator>() { public boolean hasNext() {