You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce the azdo pipelines build tag subgroup beneath azdo pipelines build (#213). This umbrella tracks the wiring of the subgroup and lists the three leaf commands that operate on build tags.
Command Group Description
Create a tag subgroup beneath azdo pipelines build that centralises tag-management flows for a single Azure Pipelines build. The group exposes the three Azure Pipelines build-tag operations that map directly to the official AzDO Extension's pipelines build tag group (Python implementation at azure-devops/azext_devops/dev/pipelines/build.py):
Each leaf is a thin wrapper over the vendored build.Client (singular AddBuildTag, bulk AddBuildTags, DeleteBuildTag, GetBuildTags). The REST surface is Builds - Tags (REST 7.1-preview.3).
Note: this group is distinct from the pipelines build definition subgroup (planned but not yet filed) which manages tags on a build definition (uses AddDefinitionTag / DeleteDefinitionTag). Tags on a build record are immutable once recorded; tags on a definition are persisted and can be inherited by builds.
Implementation Notes
Add internal/cmd/pipelines/build/tag/tag.go that exposes NewCmd(ctx util.CmdContext) *cobra.Command.
Register the new subgroup inside internal/cmd/pipelines/build/build.go so that commands such as azdo pipelines build tag list are discoverable via the CLI hierarchy. The existing umbrella feat: Introduce azdo pipelines build command group #213 already lists list, show, cancel, queue as children of build; this umbrella appends tag as a new child group.
Keep the short description focused on per-build tag management; do not duplicate descriptions of the parent build group.
Each leaf command lives in its own subdirectory under internal/cmd/pipelines/build/tag/<leaf>/<leaf>.go per AGENTS.md "New Subgroup Under Existing Group" guidance.
No new SDK clients are required: AddBuildTag, AddBuildTags, DeleteBuildTag, and GetBuildTags are all in the vendored SDK at vendor/.../v7/build/client.go:29, 31, 51, 111. Mocks are already generated at internal/mocks/build_client_mock.go:46, 61, 210.
Command Wiring
Implement the relation group in internal/cmd/pipelines/build/tag/tag.go and ensure NewCmd only wires child commands under this package.
Update internal/cmd/pipelines/build/build.go to call cmd.AddCommand(tag.NewCmd(ctx)) so the build hierarchy exposes the tag subtree.
Each leaf exports NewCmd(ctx util.CmdContext) *cobra.Command from its own subdirectory.
Run make docs once wiring is complete to update generated documentation.
SDK / Client Requirements
All three leaves rely on the Build client via ClientFactory().Build(...).
No new client methods are required.
No new mocks are required (all four are already generated).
Tooling & Validation
Format new Go code with gofmt/goimports.
Run go build ./cmd/azdo/... to ensure the CLI compiles with the new wiring.
Add/update hermetic tests and execute go test ./... (include documentation regeneration in the validation checklist).
Sub-Issues
Introduce azdo pipelines build tag subgroup wiring
Introduce the
azdo pipelines build tagsubgroup beneathazdo pipelines build(#213). This umbrella tracks the wiring of the subgroup and lists the three leaf commands that operate on build tags.Command Group Description
Create a
tagsubgroup beneathazdo pipelines buildthat centralises tag-management flows for a single Azure Pipelines build. The group exposes the three Azure Pipelines build-tag operations that map directly to the official AzDO Extension'spipelines build taggroup (Python implementation atazure-devops/azext_devops/dev/pipelines/build.py):azdo pipelines build tag add— attach one or more tags to a build (feat: Implementazdo pipelines build tag addcommand #277)azdo pipelines build tag delete— remove a tag from a build (feat: Implementazdo pipelines build tag deletecommand #278)azdo pipelines build tag list— list the tags attached to a build (feat: Implementazdo pipelines build tag listcommand #279)Each leaf is a thin wrapper over the vendored
build.Client(singularAddBuildTag, bulkAddBuildTags,DeleteBuildTag,GetBuildTags). The REST surface is Builds - Tags (REST 7.1-preview.3).Implementation Notes
internal/cmd/pipelines/build/tag/tag.gothat exposesNewCmd(ctx util.CmdContext) *cobra.Command.internal/cmd/pipelines/build/build.goso that commands such asazdo pipelines build tag listare discoverable via the CLI hierarchy. The existing umbrella feat: Introduceazdo pipelines buildcommand group #213 already listslist,show,cancel,queueas children ofbuild; this umbrella appendstagas a new child group.buildgroup.[ORGANIZATION/]PROJECT/BUILDpositional, mirroringcancel(feat: Implementazdo pipelines build cancelcommand #252) andqueue(feat: Implementazdo pipelines build queuecommand #253).internal/cmd/pipelines/build/tag/<leaf>/<leaf>.goper AGENTS.md "New Subgroup Under Existing Group" guidance.AddBuildTag,AddBuildTags,DeleteBuildTag, andGetBuildTagsare all in the vendored SDK atvendor/.../v7/build/client.go:29, 31, 51, 111. Mocks are already generated atinternal/mocks/build_client_mock.go:46, 61, 210.Command Wiring
internal/cmd/pipelines/build/tag/tag.goand ensureNewCmdonly wires child commands under this package.internal/cmd/pipelines/build/build.goto callcmd.AddCommand(tag.NewCmd(ctx))so thebuildhierarchy exposes the tag subtree.NewCmd(ctx util.CmdContext) *cobra.Commandfrom its own subdirectory.make docsonce wiring is complete to update generated documentation.SDK / Client Requirements
ClientFactory().Build(...).Tooling & Validation
gofmt/goimports.go build ./cmd/azdo/...to ensure the CLI compiles with the new wiring.go test ./...(include documentation regeneration in the validation checklist).Sub-Issues
azdo pipelines build tagsubgroup wiringazdo pipelines build tag addcommand (feat: Implementazdo pipelines build tag addcommand #277)azdo pipelines build tag deletecommand (feat: Implementazdo pipelines build tag deletecommand #278)azdo pipelines build tag listcommand (feat: Implementazdo pipelines build tag listcommand #279)References
azdo pipelines buildcommand group #213 (azdo pipelines buildcommand group).azdo pipelines runscommand group #214 (azdo pipelines runs), Introduce azdo pipelines folder command group #262 (azdo pipelines folder).add_build_tags(line 184),delete_build_tag(line 198),get_build_tags(line 210).transform_build_tags_output(single-columnTagstable).g.command('add', 'add_build_tags', table_transformer=transform_build_tags_output)andg.command('delete', 'delete_build_tag', table_transformer=transform_build_tags_output).build tagtools. The onlytagreference inpipelines.tsis thetagFiltersparameter on the list-runs tool. Reference: https://github.com/microsoft/azure-devops-mcp/blob/main/src/tools/pipelines.ts6e6114b2-8161-44c8-8f6c-c5505782427flocation ID).