Skip to content

Commit

Permalink
Merge pull request #747 from jenkinsci/larger-pagesize
Browse files Browse the repository at this point in the history
Request files for each PR in larger batch
  • Loading branch information
bjoernhaeuser authored Nov 4, 2019
2 parents f4eb4bc + 42f21b7 commit 96ada00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ boolean containsWatchedPaths(GHPullRequest pr) {
}

List<String> paths = new ArrayList<String>();
for (GHPullRequestFileDetail fileDetail : pr.listFiles()) {
for (GHPullRequestFileDetail fileDetail : pr.listFiles().withPageSize(100)) {
paths.add(fileDetail.getFilename());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public void setup() throws IOException {
@SuppressWarnings("unchecked")
PagedIterator<GHPullRequestFileDetail> pagedIterator = mock(PagedIterator.class);
given(pagedIterable.iterator()).willReturn(pagedIterator);
given(pagedIterable.withPageSize(100)).willReturn(pagedIterable);
given(pr.listFiles()).willReturn(pagedIterable);

// Create the list of file paths to return
Expand Down

0 comments on commit 96ada00

Please sign in to comment.