-
Notifications
You must be signed in to change notification settings - Fork 4
Add --json output to connection list, scope list, and project list #99
Copy link
Copy link
Closed
Description
Problem
Only status honors the global --json flag. The list commands (connection list, scope list, project list) output formatted tables to stderr but have no structured output mode.
The plumbing already exists:
outputJSONbool inroot.go:12printJSON()helper inhelpers.go:65-73
These just need to be wired into the three list commands.
Scope of Changes
configure_connection_list.go
When outputJSON is true, collect connections into a []statusConnection (or similar struct) and call printJSON() instead of writing the formatted table.
configure_scope_list.go
When outputJSON is true, output scope entries as JSON array.
configure_project_list.go
When outputJSON is true, output project entries as JSON array.
Acceptance Criteria
-
gh devlake configure connection list --jsonoutputs valid JSON to stdout -
gh devlake configure scope list --plugin github --connection-id 1 --jsonoutputs valid JSON to stdout -
gh devlake configure project list --jsonoutputs valid JSON to stdout - Without
--json, all three commands still output human-readable tables (no behavior change) -
go build ./...andgo test ./...pass
Reactions are currently unavailable
Metadata
Metadata
Labels
enhancementNew feature or requestNew feature or request