Skip to content

Look into proper support for GitHub organizations pagination

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Original discussion: !188177 (comment 2464613037)

Since there was an API support (well, partial since as you noted we use the oktokit) — I wanted to explore that path. I see this docs section in the oktokit repo:

Many GitHub API resources are paginated. While you may be tempted to start adding :page parameters to your calls, the API returns links to the next, previous, and last pages for you in the Link response header as Hypermedia link relations.

issues = client.issues 'rails/rails'
issues.concat client.get(client.last_response.rels[:next].href)

And I think we even use it in a github import wrapper: lib/gitlab/github_import/client.rb

Edited by 🤖 GitLab Bot 🤖