Skip to content

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

Merged
merged 1 commit into from
Apr 5, 2025

Conversation

juruen
Copy link
Collaborator

@juruen juruen commented Apr 5, 2025

Closes: #105

This PR makes sure that the perPage parameter in search_repositories is honored. Otherwise, we were always getting 30 results.

@juruen juruen force-pushed the juruen/fix-search-repository branch from 4e88e65 to 952641b Compare April 5, 2025 14:42
@juruen juruen marked this pull request as ready for review April 5, 2025 14:53
@Copilot Copilot AI review requested due to automatic review settings April 5, 2025 14:53
Copy link
Contributor

@Copilot Copilot AI left a 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

Copy link
Collaborator

@williammartin williammartin left a 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!

@juruen juruen merged commit 6b02799 into main Apr 5, 2025
14 checks passed
@juruen juruen deleted the juruen/fix-search-repository branch April 5, 2025 18:05
JohnDaWalka added a commit to JohnDaWalka/github-mcp-server that referenced this pull request Apr 5, 2025
fix issue with pagination in search_repositories (github#129)
AlexanderYastrebov added a commit to AlexanderYastrebov/github-mcp-server that referenced this pull request Apr 6, 2025
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]>
AlexanderYastrebov added a commit to AlexanderYastrebov/github-mcp-server that referenced this pull request Apr 6, 2025
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]>
AlexanderYastrebov added a commit to AlexanderYastrebov/github-mcp-server that referenced this pull request Apr 6, 2025
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]>
williammartin pushed a commit to AlexanderYastrebov/github-mcp-server that referenced this pull request Apr 7, 2025
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]>
williammartin pushed a commit that referenced this pull request Apr 7, 2025
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]>
manian0430 pushed a commit to ChrisLally/github-mcp-server that referenced this pull request Apr 12, 2025
manian0430 pushed a commit to ChrisLally/github-mcp-server that referenced this pull request Apr 12, 2025
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]>
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.

search_repositories returns unmanageable amount of data without pagination
2 participants