Skip to content

Commit

Permalink
Paginate deployments (#1649)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoittgt committed Jan 18, 2024
1 parent 18c148f commit 8e1bab0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/octokit/client/deployments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def deployment(repo, deployment_id, options = {})
# @return [Array<Sawyer::Resource>] A list of deployments
# @see https://developer.github.com/v3/repos/deployments/#list-deployments
def deployments(repo, options = {})
get("#{Repository.path repo}/deployments", options)
paginate("#{Repository.path repo}/deployments", options)
end
alias list_deployments deployments

Expand Down Expand Up @@ -60,7 +60,7 @@ def delete_deployment(repo, deployment_id, options = {})
# @see https://developer.github.com/v3/repos/deployments/#list-deployment-statuses
def deployment_statuses(deployment_url, options = {})
deployment = get(deployment_url, accept: options[:accept])
get(deployment.rels[:statuses].href, options)
paginate(deployment.rels[:statuses].href, options)
end
alias list_deployment_statuses deployment_statuses

Expand Down

0 comments on commit 8e1bab0

Please sign in to comment.