Skip to content

Commit 4a313c9

Browse files
Remove unused projects.utils.github_paginate
It's broken, not used in the project and superseded by oauth.utils.github_paginate.
1 parent 5f53187 commit 4a313c9

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)