Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors several GitHub tools to use a unified WithPagination() helper and renames the pagination parameter from per_page to perPage across the server interfaces.
- Replace individual
mcp.WithNumber("page")&mcp.WithNumber("per_page")calls withWithPagination() - Update handler logic to call
OptionalPaginationParamsand usepagination.page/pagination.perPage - Rename all occurrences of
per_pagetoperPagein tests and documentation
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/issues_test.go | Updated test assertions to expect perPage instead of per_page |
| pkg/github/issues.go | Swapped explicit page/per_page parameters for WithPagination() and OptionalPaginationParams |
| pkg/github/actions_test.go | Updated tests for workflows and artifacts to check perPage |
| pkg/github/actions.go | Refactored all Actions tools to use WithPagination() |
| README.md | Renamed parameters and updated descriptions for pagination flags |
Files not reviewed (1)
- pkg/github/toolsnaps/get_issue_comments.snap: Language not supported
Comments suppressed due to low confidence (2)
README.md:482
- [nitpick] Nested list items in Markdown currently use
- -, which may not render correctly; consider using two-space indentation followed by a single hyphen for nested bullets to ensure proper formatting.
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
README.md:481
- [nitpick] Consider adding the default values (e.g.,
page=1,perPage=30) to these parameter descriptions so that users know the defaults applied byOptionalPaginationParams.
- `page`: Page number for pagination (min 1) (number, optional)
JoannaaKL
approved these changes
Jul 3, 2025
nickytonline
pushed a commit
to nickytonline/github-mcp-http
that referenced
this pull request
Oct 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
WithPagination()tool option consistently for tools with pagination.Affected tools:
per_pageargument has been renamed toperPagein the affected tools. NowperPageis used across the server.This PR does not add pagination to any tools previously without pagination