Skip to content

Add Confluence Cloud support (v2.0.0)#35

Merged
kellenmurphy merged 2 commits into
mainfrom
cloud-support
Jul 20, 2026
Merged

Add Confluence Cloud support (v2.0.0)#35
kellenmurphy merged 2 commits into
mainfrom
cloud-support

Conversation

@kellenmurphy

Copy link
Copy Markdown
Owner

Summary

Adds Atlassian Cloud support alongside the existing Data Center support, released as v2.0.0.

  • CloudConfluenceClient: v2 API (/api/v2/pages/{id}) for page get/update; inherits the v1 attachment upload endpoint (v2 has none). Selected automatically for *.atlassian.net hostnames; instance_type: cloud | datacenter config field overrides for custom domains.
  • Cloud auth: CONFLUENCE_EMAIL + CONFLUENCE_TOKEN (Atlassian API token) via basic auth — not gated behind --unsafe-auth, which remains DC-password-only. A bare site URL gets /wiki appended and written back to the config so attachment download-URL construction and prefix matching keep working.
  • Attachment content reads use the REST download endpoint on Cloud (.../child/attachment/{id}/download); the legacy /download/attachments/ path returns 401 for API-token auth there. Fixes mermaid source restoration on pull.
  • Env-var credentials: the tool now accepts credentials from the environment without a .csync.env file; the csync wrapper detects a FIFO env file (e.g. a 1Password-served environment) and injects it via --env-file process substitution, since Docker Desktop's VM file sharing cannot pass host FIFOs.
  • Portable release Makefile (sed -i.bak works on BSD and GNU sed).
  • Docs: README credentials/version-support rewrite, Cloud examples, note on IPv6-related image build failures with the Docker Desktop IPv4-only fix.

Smoke-tested end to end against a live Cloud site: pull, push, round-trip stability, conflict detection, attachment upload, and mermaid render + source restore. 197 tests, 100% coverage maintained. DC client code path is unchanged.

- CloudConfluenceClient: v2 API for page get/update; inherited v1 endpoint
  for attachment upload (v2 has none). Auto-detected from *.atlassian.net
  hostnames; instance_type config field overrides for custom domains.
- Cloud auth: CONFLUENCE_EMAIL + CONFLUENCE_TOKEN (API token) basic auth,
  not gated behind --unsafe-auth. /wiki is appended to bare site URLs and
  written back to config so attachment URL matching keeps working.
- Attachment content reads use the REST download endpoint on Cloud; the
  legacy /download/attachments path 401s for API-token auth there.
- Credentials may come from the environment without a .csync.env file;
  csync injects FIFO-served env files (e.g. 1Password) via --env-file
  since Docker VM file sharing cannot pass host FIFOs.
- Portable BSD/GNU sed in the release Makefile.
- README/CLAUDE.md/examples updated; note on IPv6-related image build
  failures and the Docker Desktop IPv4-only fix.
@kellenmurphy
kellenmurphy merged commit 27354bd into main Jul 20, 2026
5 checks passed
@kellenmurphy
kellenmurphy deleted the cloud-support branch July 20, 2026 20:55
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants