From c3b614b3cad4b0ec7c7c21bd8b8beb3424ab663d Mon Sep 17 00:00:00 2001 From: Codex CLI Date: Tue, 9 Dec 2025 21:13:06 +0000 Subject: [PATCH 1/2] refactor: rename variablegroups to variablegroup commands Unify command naming by switching from plural 'variablegroups' to singular 'variablegroup' across pipelines command structure for consistency. --- internal/cmd/pipelines/pipelines.go | 4 ++-- .../{variablegroups => variablegroup}/list/list.go | 0 .../variable/list/list.go | 0 .../variable/variable.go | 2 +- .../variablegroups.go => variablegroup/variablegroup.go} | 9 +++++---- 5 files changed, 8 insertions(+), 7 deletions(-) rename internal/cmd/pipelines/{variablegroups => variablegroup}/list/list.go (100%) rename internal/cmd/pipelines/{variablegroups => variablegroup}/variable/list/list.go (100%) rename internal/cmd/pipelines/{variablegroups => variablegroup}/variable/variable.go (96%) rename internal/cmd/pipelines/{variablegroups/variablegroups.go => variablegroup/variablegroup.go} (84%) diff --git a/internal/cmd/pipelines/pipelines.go b/internal/cmd/pipelines/pipelines.go index 8604659e..e02fd10e 100644 --- a/internal/cmd/pipelines/pipelines.go +++ b/internal/cmd/pipelines/pipelines.go @@ -2,7 +2,7 @@ package pipelines import ( "github.com/spf13/cobra" - "github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroups" + "github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroup" "github.com/tmeckel/azdo-cli/internal/cmd/util" ) @@ -13,6 +13,6 @@ func NewCmd(ctx util.CmdContext) *cobra.Command { Aliases: []string{"p"}, } - cmd.AddCommand(variablegroups.NewCmd(ctx)) + cmd.AddCommand(variablegroup.NewCmd(ctx)) return cmd } diff --git a/internal/cmd/pipelines/variablegroups/list/list.go b/internal/cmd/pipelines/variablegroup/list/list.go similarity index 100% rename from internal/cmd/pipelines/variablegroups/list/list.go rename to internal/cmd/pipelines/variablegroup/list/list.go diff --git a/internal/cmd/pipelines/variablegroups/variable/list/list.go b/internal/cmd/pipelines/variablegroup/variable/list/list.go similarity index 100% rename from internal/cmd/pipelines/variablegroups/variable/list/list.go rename to internal/cmd/pipelines/variablegroup/variable/list/list.go diff --git a/internal/cmd/pipelines/variablegroups/variable/variable.go b/internal/cmd/pipelines/variablegroup/variable/variable.go similarity index 96% rename from internal/cmd/pipelines/variablegroups/variable/variable.go rename to internal/cmd/pipelines/variablegroup/variable/variable.go index a12f6d1a..87adaf7d 100644 --- a/internal/cmd/pipelines/variablegroups/variable/variable.go +++ b/internal/cmd/pipelines/variablegroup/variable/variable.go @@ -3,7 +3,7 @@ package variable import ( "github.com/MakeNowJust/heredoc" "github.com/spf13/cobra" - "github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroups/variable/list" + "github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroup/variable/list" "github.com/tmeckel/azdo-cli/internal/cmd/util" ) diff --git a/internal/cmd/pipelines/variablegroups/variablegroups.go b/internal/cmd/pipelines/variablegroup/variablegroup.go similarity index 84% rename from internal/cmd/pipelines/variablegroups/variablegroups.go rename to internal/cmd/pipelines/variablegroup/variablegroup.go index f83ed99b..50931a16 100644 --- a/internal/cmd/pipelines/variablegroups/variablegroups.go +++ b/internal/cmd/pipelines/variablegroup/variablegroup.go @@ -1,17 +1,18 @@ -package variablegroups +package variablegroup import ( "github.com/spf13/cobra" - "github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroups/list" - "github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroups/variable" + "github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroup/list" + "github.com/tmeckel/azdo-cli/internal/cmd/pipelines/variablegroup/variable" "github.com/tmeckel/azdo-cli/internal/cmd/util" ) func NewCmd(ctx util.CmdContext) *cobra.Command { cmd := &cobra.Command{ - Use: "variable-groups", + Use: "variable-group", Short: "Manage Azure DevOps variable groups", Aliases: []string{ + "variablegroup", "variable-groups", "variablegroups", "vg", From 70a4032e9951da061c1cd18f74a95121ebc0bef3 Mon Sep 17 00:00:00 2001 From: Codex CLI Date: Tue, 9 Dec 2025 21:13:29 +0000 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=F0=9F=93=84=20update=20and=20add?= =?UTF-8?q?=20pages=20for=20renamed=20variable-group=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace references to `variable-groups` with `variable-group` in existing documentation and add new dedicated docs pages for the renamed commands, including list and variable subcommands. --- docs/azdo_help_reference.md | 10 +-- docs/azdo_pipelines.md | 2 +- docs/azdo_pipelines_variable-group.md | 19 ++++++ docs/azdo_pipelines_variable-group_list.md | 63 +++++++++++++++++++ .../azdo_pipelines_variable-group_variable.md | 16 +++++ ..._pipelines_variable-group_variable_list.md | 50 +++++++++++++++ 6 files changed, 154 insertions(+), 6 deletions(-) create mode 100644 docs/azdo_pipelines_variable-group.md create mode 100644 docs/azdo_pipelines_variable-group_list.md create mode 100644 docs/azdo_pipelines_variable-group_variable.md create mode 100644 docs/azdo_pipelines_variable-group_variable_list.md diff --git a/docs/azdo_help_reference.md b/docs/azdo_help_reference.md index 4518ca25..9be43763 100644 --- a/docs/azdo_help_reference.md +++ b/docs/azdo_help_reference.md @@ -200,17 +200,17 @@ Aliases p ``` -### `azdo pipelines variable-groups` +### `azdo pipelines variable-group` Manage Azure DevOps variable groups Aliases ``` -variable-groups, variablegroups, vg +variablegroup, variable-groups, variablegroups, vg ``` -#### `azdo pipelines variable-groups list [ORGANIZATION/]PROJECT [flags]` +#### `azdo pipelines variable-group list [ORGANIZATION/]PROJECT [flags]` List variable groups @@ -230,7 +230,7 @@ Aliases ls, l ``` -#### `azdo pipelines variable-groups variable` +#### `azdo pipelines variable-group variable` Manage variables in a variable group @@ -240,7 +240,7 @@ Aliases var ``` -##### `azdo pipelines variable-groups variable list [ORGANIZATION/]PROJECT/VARIABLEGROUP [flags]` +##### `azdo pipelines variable-group variable list [ORGANIZATION/]PROJECT/VARIABLEGROUP [flags]` List variables in a variable group diff --git a/docs/azdo_pipelines.md b/docs/azdo_pipelines.md index 1c789d02..c0b99043 100644 --- a/docs/azdo_pipelines.md +++ b/docs/azdo_pipelines.md @@ -4,7 +4,7 @@ Manage Azure DevOps pipelines ### Available commands -* [azdo pipelines variable-groups](./azdo_pipelines_variable-groups.md) +* [azdo pipelines variable-group](./azdo_pipelines_variable-group.md) ### ALIASES diff --git a/docs/azdo_pipelines_variable-group.md b/docs/azdo_pipelines_variable-group.md new file mode 100644 index 00000000..e723460e --- /dev/null +++ b/docs/azdo_pipelines_variable-group.md @@ -0,0 +1,19 @@ +## Command `azdo pipelines variable-group` + +Manage Azure DevOps variable groups + +### Available commands + +* [azdo pipelines variable-group list](./azdo_pipelines_variable-group_list.md) +* [azdo pipelines variable-group variable](./azdo_pipelines_variable-group_variable.md) + +### ALIASES + +- `variablegroup` +- `variable-groups` +- `variablegroups` +- `vg` + +### See also + +* [azdo pipelines](./azdo_pipelines.md) diff --git a/docs/azdo_pipelines_variable-group_list.md b/docs/azdo_pipelines_variable-group_list.md new file mode 100644 index 00000000..ebffcca8 --- /dev/null +++ b/docs/azdo_pipelines_variable-group_list.md @@ -0,0 +1,63 @@ +## Command `azdo pipelines variable-group list` + +``` +azdo pipelines variable-group list [ORGANIZATION/]PROJECT [flags] +``` + +List every variable group defined in a project with optional filtering. + + +### Options + + +* `--action` `string` + + Action filter string (e.g., 'manage', 'use'): {none|manage|use} + +* `-q`, `--jq` `expression` + + Filter JSON output using a jq expression + +* `--json` `fields` + + Output JSON with the specified fields. Prefix a field with '-' to exclude it. + +* `--max-items` `int` (default `0`) + + Optional client-side cap on results; stop fetching once reached + +* `--order` `string` (default `"desc"`) + + Order of variable groups (asc, desc): {desc|asc} + +* `-t`, `--template` `string` + + Format JSON output using a Go template; see "azdo help formatting" + +* `--top` `int` (default `0`) + + Server-side page size hint (positive integer) + + +### ALIASES + +- `ls` +- `l` + +### JSON Fields + +`createdBy`, `createdOn`, `description`, `id`, `isShared`, `modifiedBy`, `modifiedOn`, `name`, `projectReferences`, `type`, `variables` + +### Examples + +```bash +# List all variable groups in a project +$ azdo pipelines variable-groups list "my-project" + +# List variable groups with a specific name +$ azdo pipelines variable-groups list "my-project" --name "my-variable-group" +``` + +### See also + +* [azdo pipelines variable-group](./azdo_pipelines_variable-group.md) diff --git a/docs/azdo_pipelines_variable-group_variable.md b/docs/azdo_pipelines_variable-group_variable.md new file mode 100644 index 00000000..75f3451d --- /dev/null +++ b/docs/azdo_pipelines_variable-group_variable.md @@ -0,0 +1,16 @@ +## Command `azdo pipelines variable-group variable` + +Work with variables within Azure Pipelines variable groups. + + +### Available commands + +* [azdo pipelines variable-group variable list](./azdo_pipelines_variable-group_variable_list.md) + +### ALIASES + +- `var` + +### See also + +* [azdo pipelines variable-group](./azdo_pipelines_variable-group.md) diff --git a/docs/azdo_pipelines_variable-group_variable_list.md b/docs/azdo_pipelines_variable-group_variable_list.md new file mode 100644 index 00000000..d73c975e --- /dev/null +++ b/docs/azdo_pipelines_variable-group_variable_list.md @@ -0,0 +1,50 @@ +## Command `azdo pipelines variable-group variable list` + +``` +azdo pipelines variable-group variable list [ORGANIZATION/]PROJECT/VARIABLEGROUP [flags] +``` + +List the variables in a variable group. + +The command retrieves a variable group and lists its variables. Secret variables have their +values masked by default. + +The VARIABLEGROUP can be specified by its ID or name. + + +### Options + + +* `-q`, `--jq` `expression` + + Filter JSON output using a jq expression + +* `--json` `fields` + + Output JSON with the specified fields. Prefix a field with '-' to exclude it. + +* `-t`, `--template` `string` + + Format JSON output using a Go template; see "azdo help formatting" + + +### JSON Fields + +`name`, `secret`, `value` + +### Examples + +```bash +# List variables in a group by ID within a project +azdo pipelines variable-groups variable list MyProject/123 + +# List variables in a group by name within a project and organization +azdo pipelines variable-groups variable list 'MyOrg/MyProject/My Variable Group' + +# Export variables to JSON +azdo pipelines variable-groups variable list MyProject/123 --json +``` + +### See also + +* [azdo pipelines variable-group variable](./azdo_pipelines_variable-group_variable.md)