feat: add support for self-hosted Confluence (Server / Data Center) - #1
Open
wodCZ wants to merge 2 commits into
Open
feat: add support for self-hosted Confluence (Server / Data Center)#1wodCZ wants to merge 2 commits into
wodCZ wants to merge 2 commits into
Conversation
The tool previously assumed Atlassian Cloud (the /wiki context path, email + API-token Basic auth, and accountId-based user references). Add a deployment-aware layer so self-hosted Server / Data Center instances work too. - Auto-detect deployment from the URL host (*.atlassian.net = Cloud, else self-hosted); override with a new --type cloud|server flag. - Self-hosted authenticates with a Personal Access Token via Bearer auth; email is now required only for Cloud. - Deployment-aware REST API base path (Cloud /wiki/rest/api vs server /rest/api), including support for a context path (e.g. /confluence). - Resolve users by userKey (?key=) in addition to accountId (?accountId=), and read ri:userkey / ri:username content references alongside ri:account-id. - Parse self-hosted URL forms: /pages/viewpage.action?pageId=, /spaces/SPACE/pages/ID, and pretty /display/SPACE/Title (page ID resolved from space + title via the API). - Build attachment/image download links and frontmatter page URLs from the instance context path instead of a hardcoded /wiki. Add unit tests for URL parsing/detection and client auth/paths; update README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nversion Fixes found while mirroring a large self-hosted space to Markdown: - ac:link to ri:page/ri:attachment was silently dropped (only ri:user was handled), losing every cross-page reference in tables and body text. Now renders a markdown link with a best-effort display URL. - Classic emoticons without an emoji-fallback glyph (tick, minus, information, ...) leaked as raw :name: tokens; now mapped to Unicode symbols. - view-file/viewpdf/... macros embedding attachments were left as "Unsupported macro" comments; attachments are now downloaded alongside images. - jira macro renders its issue key instead of being dropped. - contentbylabel macro (dynamic, not present in page storage) is resolved via a new Client.SearchByCQL and materialized into a link list. - children/pagetree macros are materialized into a linked list instead of a bare comment, wrapped in markers so empty-stub detection still works. - markdown macro body (already Markdown, CDATA-wrapped) is now emitted verbatim instead of left unsupported. - Page validation no longer rejects legitimately empty container pages. - A single missing/oversized attachment now warns and is skipped instead of failing the whole page conversion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
The tool previously assumed Atlassian Cloud (the /wiki context path, email + API-token Basic auth, and accountId-based user references). Add a deployment-aware layer so self-hosted Server / Data Center instances work too.
Add unit tests for URL parsing/detection and client auth/paths; update README.