feat: auto-select context when only one is configured - #234
Merged
Conversation
When a single context exists and no current context is set, GetCurrentProjectID now returns that context project ID automatically, removing the need to run acloud context use after acloud context set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #234 +/- ##
=======================================
Coverage 78.09% 78.09%
=======================================
Files 53 53
Lines 12438 12441 +3
=======================================
+ Hits 9713 9716 +3
Misses 1565 1565
Partials 1160 1160
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aru-amedeo
pushed a commit
that referenced
this pull request
Jun 19, 2026
Covers all changes since v0.5.1: - feat: context auto-selection (#234) - feat: clear-contexts prompt on profile switch (#236) - fix: shell completion parent-ID slots for network sub-resources (#239/#240) - fix: shell completion parent-ID slots for database/storage sub-resources (#241) - fix: zone value in docs examples (#238) - docs: English and Italian completion section updates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
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
GetCurrentProjectID()now auto-selects the only configured context whenCurrentContextis unset, soacloud context setalone is enough — no follow-upacloud context userequiredacloud context use <name>is requireddocs/website/docs/configuration.md) andai/ARCHITECTURE.mdupdated to document the behaviourTest plan
acloud context set my-ctx --project-id <id>thenacloud network vpc listworks withoutacloud context useacloud context usestill returns an errorgo test ./cmd/ -run TestGetCurrentProjectID— all passACLOUD_TEST_SKIP_CLIENT=true go test ./cmd/— no regressionsCloses #235
Generated with Claude Code