Reference in New Issue
Block a user
Delete Branch "fix/606-607-wiki-api-bugs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Fixes two wiki API bugs:
#606: Sub-pages with path separators return 404
{pageName}to wildcard*to capture slashes in page paths (e.g.mcp/fleet-overview)ListWikiPagesto useListEntriesRecursiveFast()instead ofListEntries()so pages in subdirectories are included#607: content_base64 empty in POST/PATCH responses
wikiContentsByEntryto diagnose empty content responsesChanges
routers/api/v1/api.go: Wiki routes use wildcard instead of{pageName}routers/api/v1/repo/wiki.go: Recursive listing, wildcard path param, error loggingMCP Compatibility
The MCP tool
gitea_wiki_page_getalready constructs URLs with the page name in the path — slashes will now work naturally with the wildcard route.Closes #606, Closes #607
- Change wiki API routes from {pageName} to wildcard (*) to support pages with path separators (e.g. mcp/fleet-overview) - Use ListEntriesRecursiveFast() in ListWikiPages to include pages in subdirectories, not just root-level files - Add error logging in wikiContentsByEntry for diagnosing empty content_base64 responses - Fix pagination to count only regular files, not directories Co-Authored-By: Moko Consulting <hello@mokoconsulting.tech>