Conversation
Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
scope list
There was a problem hiding this comment.
Pull request overview
Adds structured --json output support to gh devlake configure scope list, bringing it in line with other list commands (connection list, project list) and ensuring the command can produce machine-readable output without interactive prompts.
Changes:
- Added a JSON output path to
scope list, including ascopeListItemrepresentation and quiet discovery whenoutputJSONis enabled. - Enforced
--pluginand--connection-idas required inputs in JSON mode to avoid interactive prompts. - Added unit tests covering JSON field names/
omitemptybehavior and the JSON-mode flag requirement error.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/configure_scope_list.go | Implements --json output for scope listing, including non-interactive guardrails and quiet discovery. |
| cmd/json_output_test.go | Adds tests for scopeListItem JSON shape and JSON-mode required-flag behavior. |
|
@copilot Two documentation updates needed:
|
…d configure-scope.md Co-authored-by: ewega <26189114+ewega@users.noreply.github.com>
Done in df51c3a:
|
scopeListItemstruct and--jsonoutput path toconfigure_scope_list.goTestScopeListItem_JSONFieldsandTestRunScopeList_JSONRequiresFlagstests tojson_output_test.gogo build ./...andgo test ./...passconfigure scope listandconfigure project listrows to--jsoncommands table--jsonflag note, requirement, and JSON output example toscope listsectionOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.