From e9671db2d36686f8d3a5aa458c23661fd6472c9a Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Fri, 13 Dec 2024 22:41:21 -0500 Subject: [PATCH] utils/github: handle over 30 changed files --- Library/Homebrew/utils/github.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index ddd8ad49810bf..fc5f934bbed3f 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -675,7 +675,11 @@ def self.check_for_duplicate_pull_requests(name, tap_remote_repo, file:, quiet: end def self.get_pull_request_changed_files(tap_remote_repo, pull_request) - API.open_rest(url_to("repos", tap_remote_repo, "pulls", pull_request, "files")) + files = [] + API.paginate_rest(url_to("repos", tap_remote_repo, "pulls", pull_request, "files")) do |result| + files.concat(result) + end + files end private_class_method def self.add_auth_token_to_url!(url)