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

Description about the default value of the per_page option #1215

Closed
ybiquitous opened this issue Mar 25, 2020 · 3 comments
Closed

Description about the default value of the per_page option #1215

ybiquitous opened this issue Mar 25, 2020 · 3 comments
Labels
Status: Stale Used by stalebot to clean house Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@ybiquitous
Copy link
Contributor

Hi there,

I found the difference between README and the actual code, about the default per_page value.

REAMDE: 30

Default results from the GitHub API are 30, if you wish to add more you must do so during Octokit configuration.

https://github.com/octokit/octokit.rb/blob/c5037e4abbf154b2123019e8d109e24490bf1be5/README.md#default-results-per_page

Code: 100

opts[:query][:per_page] ||= @per_page || (@auto_paginate ? 100 : nil)

It seems that the README description is incorrect, but what do you think?
Thanks.

@tarebyte
Copy link
Member

@ybiquitous the actual GitHub API defaults to 30 if we don't pass in a per_page query parameter. It looks like we set it in the client as 100 if we are auto paginating so that we make fewer requests.

I'm not sure I see the inconsistency here.

@ybiquitous
Copy link
Contributor Author

Surely, there is no inconsistency.
But the behavior, which per_page is 100 if auto_paginate is set, seems undocumented and may confuse users (like me 😅 ).

So, what about documenting that behavior on this README?

@nickfloyd nickfloyd added Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed question labels Oct 28, 2022
@github-actions
Copy link

👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!

@github-actions github-actions bot added the Status: Stale Used by stalebot to clean house label Jul 26, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Used by stalebot to clean house Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
None yet
Development

No branches or pull requests

3 participants