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