From c7044a6b6b7347bb02d5ebf97c5a83d04e144248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Carri=C3=A7o?= Date: Thu, 7 Mar 2024 09:02:54 +0000 Subject: [PATCH] Use auto pagination when retrieving environments --- lib/octokit/client/environments.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/octokit/client/environments.rb b/lib/octokit/client/environments.rb index 33f43d984..ba03c43bf 100644 --- a/lib/octokit/client/environments.rb +++ b/lib/octokit/client/environments.rb @@ -24,7 +24,7 @@ def environment(repo, environment_name, options = {}) # @return [Sawyer::Resource] Total count of environments and list of environments # @see https://docs.github.com/en/rest/deployments/environments#list-environments def environments(repo, options = {}) - get("#{Repository.path repo}/environments", options) + paginate("#{Repository.path repo}/environments", options) end alias list_environments environments