-
Notifications
You must be signed in to change notification settings - Fork 700
fix issue with pagination in search_repositories #129
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
Conversation
4e88e65
to
952641b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a pagination bug in the search_repositories function by ensuring the correct parameter ("perPage") is used so that the specified number of results per page is honored.
- Updated the test input in pkg/github/search_test.go from "per_page" to "perPage".
- Updated the parameter processing in pkg/github/search.go to use "perPage".
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
pkg/github/search_test.go | Changes parameter key for test input consistency. |
pkg/github/search.go | Applies the corrected parameter key in the code. |
Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, looks like I missed this one when I was mass find and replacing to do the conformance!
fix issue with pagination in search_repositories (github#129)
Page site tool parameter names were changed to `perPage` within github#129 while GitHub API uses `per_page` parameter name. This change fixes overlooked inconsistencies. Follow up on github#129 Fixes github#136 Signed-off-by: Alexander Yastrebov <[email protected]>
Page size tool parameter names were changed to `perPage` within github#129 while GitHub API uses `per_page` parameter name. This change fixes overlooked inconsistencies. Follow up on github#129 Fixes github#136 Signed-off-by: Alexander Yastrebov <[email protected]>
Page size tool parameter names were changed to `perPage` within github#90 while GitHub API uses `per_page` parameter name. This change fixes overlooked inconsistencies. Follow up on github#90 Follow up on github#129 Fixes github#136 Signed-off-by: Alexander Yastrebov <[email protected]>
Page size tool parameter names were changed to `perPage` within github#90 while GitHub API uses `per_page` parameter name. This change fixes overlooked inconsistencies. Follow up on github#90 Follow up on github#129 Fixes github#136 Signed-off-by: Alexander Yastrebov <[email protected]>
Page size tool parameter names were changed to `perPage` within #90 while GitHub API uses `per_page` parameter name. This change fixes overlooked inconsistencies. Follow up on #90 Follow up on #129 Fixes #136 Signed-off-by: Alexander Yastrebov <[email protected]>
Page size tool parameter names were changed to `perPage` within github#90 while GitHub API uses `per_page` parameter name. This change fixes overlooked inconsistencies. Follow up on github#90 Follow up on github#129 Fixes github#136 Signed-off-by: Alexander Yastrebov <[email protected]>
Closes: #105
This PR makes sure that the
perPage
parameter insearch_repositories
is honored. Otherwise, we were always getting 30 results.