Skip to content

Remove unused projects.utils.github_paginate #1518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions readthedocs/projects/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,3 @@ def make_api_project(project_data):
project = Project(**project_data)
project.save = _new_save
return project


def github_paginate(client, url):
"""
Scans trough all github paginates results and returns the concatenated
list of results.

:param client: requests client instance
:param url: start url to get the data from.

See https://developer.github.com/v3/#pagination
"""
result = []
while url:
r = session.get(url)
result.extend(r.json())
url = r.links.get('next')
return result