fix: recognize keychain/env atl credentials in hasOAuthCredentials()#100
Merged
Conversation
hasOAuthCredentials() only scanned ~/.config/atlassian/config.yaml, so it was blind to credentials that atl resolves from the OS keychain or environment variables. After the shared-OAuth-app rollout a freshly onboarded dev has the shared client provisioned in the keychain (empty config.yaml), so the old check returned false and walked them through creating their own OAuth app — defeating the migration. Ask atl itself first: parse the 'OAuth credentials: <source>' line from 'atl auth status' (env vars > OS keychain > config file), treating anything but 'not configured' as configured. Fall back to the config.yaml scan for an older atl that predates keychain support or when the binary isn't found. Claude-Session: https://claude.ai/code/session_01A15prxAxWv2CBfZKzFxTD2
Merged
Hinne1
added a commit
that referenced
this pull request
Jul 10, 2026
Ships the keychain/env-aware hasOAuthCredentials() from #100 so the shared Atlassian OAuth app rollout is picked up by environment-setup (dep ^1.9.0). Claude-Session: https://claude.ai/code/session_01A15prxAxWv2CBfZKzFxTD2
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.
Why
Fast-follow to the shared-Atlassian-app rollout (env-setup #374 / DEV-178).
hasOAuthCredentials()only scanned~/.config/atlassian/config.yaml, so it was blind to credentials atl resolves from the OS keychain or env vars.Post-rollout, a freshly onboarded dev has the shared client provisioned in the keychain with an empty
config.yaml. The old check returnedfalse→configureAtlassianCli()walked them through creating their own OAuth app, defeating the migration. (Existing devs are unaffected — they already have aconfig.yamlclient_id.)What
Ask atl itself first: parse the
OAuth credentials: <source>line fromatl auth status(atl's own resolver is env > keychain > config), treating anything butnot configuredas configured. Fall back to theconfig.yamlscan for an older atl that predates keychain support, or when the binary isn't found — so no behavior change on v1.8.Verification
Ran
hasOAuthCredentials()against real atl + keychain (config.yaml moved aside to isolate the keychain path, restored after):OS keychainnot configuredconfig filenpm run lintclean,prettier --checkclean.https://claude.ai/code/session_01A15prxAxWv2CBfZKzFxTD2