Skip to content

Commit 6fbef6d

Browse files
committed
Merge pull request #1518 from rtfd/remove-unused-github-paginate
Remove unused projects.utils.github_paginate
2 parents f4b987c + 4a313c9 commit 6fbef6d

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

readthedocs/projects/utils.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -182,21 +182,3 @@ def make_api_project(project_data):
182182
project = Project(**project_data)
183183
project.save = _new_save
184184
return project
185-
186-
187-
def github_paginate(client, url):
188-
"""
189-
Scans trough all github paginates results and returns the concatenated
190-
list of results.
191-
192-
:param client: requests client instance
193-
:param url: start url to get the data from.
194-
195-
See https://developer.github.com/v3/#pagination
196-
"""
197-
result = []
198-
while url:
199-
r = session.get(url)
200-
result.extend(r.json())
201-
url = r.links.get('next')
202-
return result

0 commit comments

Comments
 (0)