This repository was archived by the owner on Feb 6, 2026. It is now read-only.
feat: add ATLASSIAN_* env var fallbacks for shared credentials#100
Merged
feat: add ATLASSIAN_* env var fallbacks for shared credentials#100
Conversation
Add support for shared ATLASSIAN_* environment variables that work across both cfl (Confluence) and jtk (Jira) CLIs. Precedence order (first match wins): - URL: CFL_URL → ATLASSIAN_URL → config - Email: CFL_EMAIL → ATLASSIAN_EMAIL → config - Token: CFL_API_TOKEN → ATLASSIAN_API_TOKEN → config This allows users to set credentials once for both tools: export ATLASSIAN_URL=https://mycompany.atlassian.net export ATLASSIAN_EMAIL=user@example.com export ATLASSIAN_API_TOKEN=token While still allowing per-tool overrides when needed. Closes #99
Collaborator
Author
Test Coverage AssessmentSummaryThe test coverage for this PR is excellent. The new functionality is well-tested with appropriate coverage of all critical paths. What's Tested
Assessment
No Gaps IdentifiedThe PR adds:
Both are fully covered by the new tests. The test structure follows existing patterns in the codebase and properly cleans up environment variables. Verdict: No additional test coverage needed. The tests verify the documented behavior (precedence order) and cover the realistic use cases described in the PR. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
ATLASSIAN_URL,ATLASSIAN_EMAIL,ATLASSIAN_API_TOKENenv var fallbacksCFL_*) take precedence over shared vars (ATLASSIAN_*)Precedence Order
CFL_URL→ATLASSIAN_URL→ configCFL_EMAIL→ATLASSIAN_EMAIL→ configCFL_API_TOKEN→ATLASSIAN_API_TOKEN→ configUsage
Shared credentials (both tools):
Per-tool override:
Changes
internal/config/config.go: AddgetEnvWithFallback()helper, updateLoadFromEnv()internal/config/config_test.go: Add tests for fallback behavior and precedenceREADME.md,CLAUDE.md: Document new env varsTest Plan
Closes #99