Skip to content

feat: allow listing contexts as json/yaml#1352

Open
phm07 wants to merge 1 commit intomainfrom
context-list-json
Open

feat: allow listing contexts as json/yaml#1352
phm07 wants to merge 1 commit intomainfrom
context-list-json

Conversation

@phm07
Copy link
Contributor

@phm07 phm07 commented Mar 5, 2026

Adds -o=json|yaml to context list. This also fixes hcloud context list --quiet outputting nothing at all.

Fixes #1347

@phm07 phm07 self-assigned this Mar 5, 2026
@phm07 phm07 requested a review from a team as a code owner March 5, 2026 14:00
@phm07
Copy link
Contributor Author

phm07 commented Mar 5, 2026

Not sure if we want to expose tokens by default

@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

❌ Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.59%. Comparing base (1d407d0) to head (cc84d4c).

Files with missing lines Patch % Lines
internal/cmd/context/list.go 78.26% 3 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1352      +/-   ##
==========================================
+ Coverage   72.57%   72.59%   +0.02%     
==========================================
  Files         300      300              
  Lines       10989    11009      +20     
==========================================
+ Hits         7975     7992      +17     
- Misses       2125     2127       +2     
- Partials      889      890       +1     
Flag Coverage Δ
e2e 51.38% <4.34%> (-0.11%) ⬇️
unit 67.60% <78.26%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

hcloud context: add JSON output

1 participant