feat: make Confluence API path configurable#14
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds configurable REST API path support to make the CLI compatible with both Confluence Cloud (/wiki/rest/api) and Server/Data Center (/rest/api) installations out of the box.
- Added automatic API path detection based on domain pattern (*.atlassian.net uses
/wiki/rest/api, others use/rest/api) - Introduced
CONFLUENCE_API_PATHenvironment variable for manual overrides - Updated configuration wizard to prompt for and validate API paths with smart defaults
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/confluence-client.js | Updated constructor to use configurable API path with sanitization |
| lib/config.js | Added API path inference, validation, and configuration prompts |
| tests/confluence-client.test.js | Added unit tests for API path handling and normalization |
| README.md | Updated documentation to explain API path configuration |
| CHANGELOG.md | Added changelog entry for the new feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
pchuri
marked this pull request as ready for review
September 28, 2025 11:57
|
🎉 This PR is included in version 1.8.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
bestend
pushed a commit
to bestend/confluence-cli
that referenced
this pull request
Feb 9, 2026
* feat(config): allow configuring Confluence API path * fix(config): allow blank api path to use default Fixes pchuri#13
bestend
pushed a commit
to bestend/confluence-cli
that referenced
this pull request
Feb 9, 2026
# [1.8.0](pchuri/confluence-cli@v1.7.0...v1.8.0) (2025-09-28) ### Features * make Confluence API path configurable ([pchuri#14](pchuri#14)) ([447d253](pchuri@447d253)), closes [pchuri#13](pchuri#13)
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
Adds first-class support for both
/rest/apiand/wiki/rest/apiso the CLI works out of the box with Confluence Server/Data Center and Cloud.Changes
confluence initto capture the REST API path, defaulting to/wiki/rest/apifor*.atlassian.netdomains and/rest/apiotherwise.CONFLUENCE_API_PATHenvironment variable.ConfluenceClientto normalize the base path before constructing the axios client.Testing
npm run lintnpm test -- --runInBand