Skip to content
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

Don't double-paginate GitHub responses #506

Merged
merged 1 commit into from
Dec 10, 2014
Merged

Conversation

bernerdschaefer
Copy link
Contributor

Oktokit::Client is always initialized with auto_paginate: true,
so no additional pagination work is necessary. In fact, paginating
from Hound caused lists with > 100 results to return duplicate
entries and perform redundant work.

).with(
headers: { "Authorization" => "token #{token}" }
).to_return(
status: 200,
body: File.read('spec/support/fixtures/github_repos_response_for_jimtom.json'),
headers: { 'Content-Type' => 'application/json; charset=utf-8' }
headers: {
"Link" => %(<https://api.github.com/user/repos?page=2&per_page=100>; rel="next"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [89/80]

@gylaz
Copy link
Member

gylaz commented Dec 10, 2014

👍

Oktokit::Client is always initialized with `auto_paginate: true`,
so no additional pagination work is necessary. In fact, paginating
from Hound caused lists with > 100 results to return duplicate
entries and perform redundant work.
@bernerdschaefer bernerdschaefer merged commit 23cbbe3 into master Dec 10, 2014
@bernerdschaefer bernerdschaefer deleted the bs-fix-pagination branch December 10, 2014 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants