pvillard31 commented on code in PR #10186:
URL: https://github.com/apache/nifi/pull/10186#discussion_r2276827583


##########
nifi-extension-bundles/nifi-github-bundle/nifi-github-extensions/src/main/java/org/apache/nifi/github/GitHubRepositoryClient.java:
##########
@@ -276,8 +299,13 @@ public List<GitCommit> getCommits(final String path, final 
String branch) throws
                         .toList();
 
                 final List<GitCommit> commits = new ArrayList<>();
+                int i = 0;
                 for (final GHCommit ghCommit : ghCommits) {
+                    if (i >= MAX_COMMITS_TO_RETRIEVE) {
+                        break;
+                    }

Review Comment:
   The page size does not limit how many commits we retrieve, only how many 
commits we have per page but the listing would go over all of the pages 
regardless. This is something in the implementation of the client itself. The 
only way to limit the amount of commits retrieved during listing would be by 
providing an "afterDate" value in the query builder.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to