feat: add wiki ZIP export endpoint and download buttons#44
Open
Selene29 wants to merge 3 commits intorepowise-dev:mainfrom
Open
feat: add wiki ZIP export endpoint and download buttons#44Selene29 wants to merge 3 commits intorepowise-dev:mainfrom
Selene29 wants to merge 3 commits intorepowise-dev:mainfrom
Conversation
Collaborator
|
The ZIP approach is clean and the folder structure is a good improvement over the flat export. Tests look good. One issue before merge: from sqlalchemy import select
pages = (await session.execute(select(Page).where(Page.repository_id == repo_id))).scalars().all()That removes the cap entirely without touching the shared CRUD function. |
GET /api/repos/{repo_id}/export returns a ZIP archive with pages
organized as wiki/{page_type}/{target_path}.md. Includes tests for
success and 404 cases.
Add "Download ZIP" button next to "Export All" on the docs page, and
an "Export" button in the operations panel. Both link to the new
GET /api/repos/{repo_id}/export endpoint.
a60af7c to
bf5116c
Compare
Reviewer feedback: crud.list_pages silently truncates at the limit arg. Use a direct select(Page) query instead so large repos export fully.
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
GET /api/repos/{repo_id}/exportendpoint that returns a ZIP archive with pages organized aswiki/{page_type}/{target_path}.mdThe docs page already had a markdown "Export All" button; this adds a structured ZIP alternative that preserves folder hierarchy.
Test plan