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 folder subgroup under the pipelines umbrella (#116), parented by the build subgroup umbrella (#213). This subgroup manages Azure DevOps build definition folders.
Project-scoped, with a path target. Folders are owned by projects. The folder subgroup takes a positional[ORGANIZATION/]PROJECT/PATH (or falls back to the default organization + the --project flag for the project component), identical to the variable-group subgroup's delete command (Use: "delete [ORGANIZATION/]PROJECT/GROUP", see internal/cmd/pipelines/variablegroup/delete/delete.go:34).
Four leaves, no show — az pipelines folder does not expose one in the Azure CLI; users discover folders via list and drill into the JSON output to inspect individual folders.
Scope
Mirrors az pipelines folder. All commands reuse the vendored build.Client (same client as the build subgroup, #213):
All four methods are already vendored at vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v7/build/client.go:584 (CreateFolder), :757 (DeleteFolder), :2490 (GetFolders), :3919 (UpdateFolder). The Folder model is at vendor/.../v7/build/models.go:1401 with fields CreatedBy, CreatedOn, Description, LastChangedBy, LastChangedDate, Path, Project. The FolderQueryOrder enum is at models.go:1419 with values None, FolderAscending ("folderAscending"), FolderDescending ("folderDescending").
All four mocks are already generated at internal/mocks/build_client_mock.go:182-193 (CreateFolder), :254-265 (DeleteFolder), :881-893 (GetFolders), :1420-1432 (UpdateFolder). No mock regeneration needed.
A new helper, util.ParseProjectPathTargetWithDefaultOrganization, is added as part of the create (#263) implementation. It splits [ORGANIZATION/]PROJECT/PATH into 3 strings (PATH may contain /). This mirrors the pattern from #247 where a thin new wrapper is added by the sub-issue that first needs it.
Implementation Outline
Create internal/cmd/pipelines/folder/folder.go (umbrella) with Use: "folder", Aliases: []string{"folders"}. No leaf commands in this file — it only registers the four children.
Register the new subgroup from internal/cmd/pipelines/pipelines.go next to the other subgroups. The exact registration order is up to the implementer, but the slot should keep the help text stable (current order includes agent, build, pool, queue, runs, variable, variable-group).
No new SDK client is required. No new mocks are required. No go mod tidy / go mod vendor / scripts/generate_mocks.sh work is required for this umbrella or for any of its sub-issues.
Azure DevOps REST API (Preview 7.1-preview.2, API area Build): Folders — Create Folder (PUT), Delete Folder (DELETE), Get Folders (GET), Update Folder (POST). All four share route id a906531b-d2da-4f55-bda7-f3e676cc50d9 (definition folder operations).
Siblings that share the project-scope + path-target pattern: pipelines/variable-group delete (internal/cmd/pipelines/variablegroup/delete/delete.go:34 — Use: "delete [ORGANIZATION/]PROJECT/GROUP"), pipelines/variable-group update (mirror for the fetch→mutate→PUT-style POST pattern).
Sibling for the destructive-confirmation pattern: pipelines/variable-group delete confirmation prompt.
Sibling for the list+optional-filter pattern: pipelines/variable-group list (no positional target — just [ORGANIZATION/]). Folder list adds an optional --path flag for sub-folder filtering.
Introduce the
azdo pipelines foldersubgroup under thepipelinesumbrella (#116), parented by thebuildsubgroup umbrella (#213). This subgroup manages Azure DevOps build definition folders.CLI Structure
Four leaves, no
show—az pipelines folderdoes not expose one in the Azure CLI; users discover folders vialistand drill into the JSON output to inspect individual folders.Scope
Mirrors
az pipelines folder. All commands reuse the vendoredbuild.Client(same client as thebuildsubgroup, #213):build.Client.CreateFolder— create a new folder (feat: Implementazdo pipelines folder createcommand #263)build.Client.DeleteFolder— delete a folder (and its definitions/builds) (feat: Implementazdo pipelines folder deletecommand #264)build.Client.GetFolders— list folders, optionally under a sub-path (feat: Implementazdo pipelines folder listcommand #265)build.Client.UpdateFolder— rename or re-describe an existing folder (feat: Implementazdo pipelines folder updatecommand #266)All four methods are already vendored at
vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v7/build/client.go:584(CreateFolder),:757(DeleteFolder),:2490(GetFolders),:3919(UpdateFolder). TheFoldermodel is atvendor/.../v7/build/models.go:1401with fieldsCreatedBy,CreatedOn,Description,LastChangedBy,LastChangedDate,Path,Project. TheFolderQueryOrderenum is atmodels.go:1419with valuesNone,FolderAscending("folderAscending"),FolderDescending("folderDescending").All four mocks are already generated at
internal/mocks/build_client_mock.go:182-193(CreateFolder),:254-265(DeleteFolder),:881-893(GetFolders),:1420-1432(UpdateFolder). No mock regeneration needed.A new helper,
util.ParseProjectPathTargetWithDefaultOrganization, is added as part of thecreate(#263) implementation. It splits[ORGANIZATION/]PROJECT/PATHinto 3 strings (PATH may contain/). This mirrors the pattern from #247 where a thin new wrapper is added by the sub-issue that first needs it.Implementation Outline
internal/cmd/pipelines/folder/folder.go(umbrella) withUse: "folder",Aliases: []string{"folders"}. No leaf commands in this file — it only registers the four children.internal/cmd/pipelines/pipelines.gonext to the other subgroups. The exact registration order is up to the implementer, but the slot should keep the help text stable (current order includesagent,build,pool,queue,runs,variable,variable-group).create(feat: Implementazdo pipelines folder createcommand #263),delete(feat: Implementazdo pipelines folder deletecommand #264),list(feat: Implementazdo pipelines folder listcommand #265),update(feat: Implementazdo pipelines folder updatecommand #266) — each implemented in its respective sub-issue.go mod tidy/go mod vendor/scripts/generate_mocks.shwork is required for this umbrella or for any of its sub-issues.References
vendor/github.com/microsoft/azure-devops-go-api/azuredevops/v7/build/client.go(lines cited above).vendor/.../v7/build/models.go:1401(Folder),:1419(FolderQueryOrder).internal/mocks/build_client_mock.go(lines cited above).7.1-preview.2, API areaBuild): Folders —Create Folder(PUT),Delete Folder(DELETE),Get Folders(GET),Update Folder(POST). All four share route ida906531b-d2da-4f55-bda7-f3e676cc50d9(definition folder operations).internal/azdo/factory.go:61—ClientFactory().Build(ctx, organization).internal/azdo/connection.go:50-51.pipelines/build(feat: Introduceazdo pipelines buildcommand group #213) — samebuild.Client, same vendor location, same mock file.pipelines/variable-group delete(internal/cmd/pipelines/variablegroup/delete/delete.go:34—Use: "delete [ORGANIZATION/]PROJECT/GROUP"),pipelines/variable-group update(mirror for the fetch→mutate→PUT-style POST pattern).pipelines/variable-group deleteconfirmation prompt.pipelines/variable-group list(no positional target — just[ORGANIZATION/]). Folderlistadds an optional--pathflag for sub-folder filtering.Introduce azdo pipelines agent command group).azdo pipelines buildcommand group #213 (feat: Introduce azdo pipelines build command group).Sub-issues
azdo pipelines folder createcommand #263 —feat: Implement azdo pipelines folder create(filed)azdo pipelines folder deletecommand #264 —feat: Implement azdo pipelines folder delete(filed)azdo pipelines folder listcommand #265 —feat: Implement azdo pipelines folder list(filed)azdo pipelines folder updatecommand #266 —feat: Implement azdo pipelines folder update(filed)