Skip to content

Commit

Permalink
Merge pull request #18933 from Homebrew/no-conflicts-paginate
Browse files Browse the repository at this point in the history
utils/github: handle over 30 changed files
  • Loading branch information
carlocab authored Dec 14, 2024
2 parents e21d876 + e9671db commit ccb463b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Library/Homebrew/utils/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ccb463b

Please sign in to comment.