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)