Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 38983df

Browse filesBrowse files
committed
If we are a returning a collection of all things, we might as well use the maximum page size to minimize HTTP requests.
1 parent df963cb commit 38983df
Copy full SHA for 38983df

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎src/main/java/org/kohsuke/github/GHOrganization.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHOrganization.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public GHTeam createTeam(String name, Permission p, GHRepository... repositories
220220
*/
221221
public List<GHRepository> getRepositoriesWithOpenPullRequests() throws IOException {
222222
List<GHRepository> r = new ArrayList<GHRepository>();
223-
for (GHRepository repository : listRepositories()) {
223+
for (GHRepository repository : listRepositories(100)) {
224224
repository.wrap(root);
225225
List<GHPullRequest> pullRequests = repository.getPullRequests(GHIssueState.OPEN);
226226
if (pullRequests.size() > 0) {

‎src/main/java/org/kohsuke/github/GHPerson.java

Copy file name to clipboardExpand all lines: src/main/java/org/kohsuke/github/GHPerson.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ protected synchronized void populate() throws IOException {
5252
*/
5353
public synchronized Map<String,GHRepository> getRepositories() throws IOException {
5454
Map<String,GHRepository> repositories = new TreeMap<String, GHRepository>();
55-
for (GHRepository r : listRepositories()) {
55+
for (GHRepository r : listRepositories(100)) {
5656
repositories.put(r.getName(),r);
5757
}
5858
return Collections.unmodifiableMap(repositories);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.