fix: paginate list_wiki_pages to return all results#7
Open
Lcstyle wants to merge 1 commit intoraohwork:masterfrom
Open
fix: paginate list_wiki_pages to return all results#7Lcstyle wants to merge 1 commit intoraohwork:masterfrom
Lcstyle wants to merge 1 commit intoraohwork:masterfrom
Conversation
MyListWikiPages made a single API request without pagination parameters, so it only returned the first 30 pages (Gitea's default limit). Wikis with more than 30 pages appeared truncated to MCP clients. Now paginates through all results using page/limit query parameters, collecting results until a partial page indicates the end. Includes 3 unit tests: multi-page pagination, single-page optimization, and empty wiki error handling.
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.
Summary
list_wiki_pagesnow paginates through all results instead of returning only the first 30 (Gitea's defaultlimit)pageandlimitquery parameters, collecting results until a partial page indicates the endProblem
MyListWikiPagesmade a single API request to/repos/{owner}/{repo}/wiki/pageswithout any pagination parameters. The Gitea API defaults to returning 30 items per page, so wikis with more than 30 pages appeared truncated. For example, a repository with 162 wiki pages would only show 30 to MCP clients.Test plan
TestMyListWikiPages_Paginationtests pass🤖 Generated with Claude Code