Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

- name: Run tests
if: ${{ github.event_name == 'pull_request' }}
run: |
set -e
echo "Running unit tests..."
go test ./...

- name: GoReleaser
uses: goreleaser/goreleaser-action@v6.4.0
with:
Expand Down
1 change: 1 addition & 0 deletions docs/azdo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Work seamlessly with Azure DevOps from the command line.
### Core commands

* [azdo auth](./azdo_auth.md)
* [azdo boards](./azdo_boards.md)
* [azdo graph](./azdo_graph.md)
* [azdo pr](./azdo_pr.md)
* [azdo project](./azdo_project.md)
Expand Down
22 changes: 22 additions & 0 deletions docs/azdo_boards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Command `azdo boards`

Work with Azure Boards resources.

### Available commands

* [azdo boards area](./azdo_boards_area.md)

### ALIASES

- `b`

### Examples

```bash
# List area paths for the default organization's Fabrikam project
azdo boards area project list Fabrikam
```

### See also

* [azdo](./azdo.md)
22 changes: 22 additions & 0 deletions docs/azdo_boards_area.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Command `azdo boards area`

Manage area paths used by Azure Boards.

### Available commands

* [azdo boards area project](./azdo_boards_area_project.md)

### ALIASES

- `a`

### Examples

```bash
# List the area paths for a project
azdo boards area project list Fabrikam
```

### See also

* [azdo boards](./azdo_boards.md)
23 changes: 23 additions & 0 deletions docs/azdo_boards_area_project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Command `azdo boards area project`

Manage area paths scoped to a project.

### Available commands

* [azdo boards area project list](./azdo_boards_area_project_list.md)

### ALIASES

- `prj`
- `p`

### Examples

```bash
# List area paths under a project
azdo boards area project list Fabrikam
```

### See also

* [azdo boards area](./azdo_boards_area.md)
60 changes: 60 additions & 0 deletions docs/azdo_boards_area_project_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
## Command `azdo boards area project list`

```
azdo boards area project list [ORGANIZATION/]PROJECT [flags]
```

List Azure Boards area paths for a project. The project argument accepts the form
[ORGANIZATION/]PROJECT. When the organization segment is omitted, the default
organization from configuration is used.


### Options


* `--depth` `int` (default `1`)

Depth of child nodes to include (use 0 to omit child nodes).

* `-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.

* `--path` `string`

Restrict results to a specific area path (relative paths like "Payments" or "Payments/Sub" are resolved under <project>/Area).

* `-t`, `--template` `string`

Format JSON output using a Go template; see "azdo help formatting"


### ALIASES

- `ls`
- `l`

### JSON Fields

`hasChildren`, `id`, `identifier`, `name`, `parentPath`, `path`

### Examples

```bash
# List the top-level area paths for Fabrikam using the default organization
azdo boards area project list Fabrikam

# List the full area tree for a project in a specific organization
azdo boards area project list myorg/Fabrikam --depth 5

# List the sub-tree under a specific area path (relative paths are resolved under <project>/Area)
azdo boards area project list myorg/Fabrikam --path Payments --depth 3
```

### See also

* [azdo boards area project](./azdo_boards_area_project.md)
48 changes: 48 additions & 0 deletions docs/azdo_help_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,54 @@ Setup git with AzDO CLI

View authentication status

## `azdo boards <command>`

Work with Azure Boards resources.

Aliases

```
b
```

### `azdo boards area <command>`

Manage area paths used by Azure Boards.

Aliases

```
a
```

#### `azdo boards area project <command>`

Manage area paths scoped to a project.

Aliases

```
prj, p
```

##### `azdo boards area project list [ORGANIZATION/]PROJECT [flags]`

List area paths defined for a project.

```
--depth int Depth of child nodes to include (use 0 to omit child nodes). (default 1)
-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.
--path string Restrict results to a specific area path (relative paths like "Payments" or "Payments/Sub" are resolved under <project>/Area).
-t, --template string Format JSON output using a Go template; see "azdo help formatting"
```

Aliases

```
ls, l
```

## `azdo co`

Alias for "pr checkout"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
github.com/zalando/go-keyring v0.2.6
go.uber.org/mock v0.6.0
go.uber.org/zap v1.27.0
golang.org/x/sys v0.37.0
golang.org/x/sys v0.38.0
golang.org/x/term v0.36.0
golang.org/x/text v0.30.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.37.0 h1:fdNQudmxPjkdUTPnLn5mdQv7Zwvbvpaxqs831goi9kQ=
golang.org/x/sys v0.37.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.36.0 h1:zMPR+aF8gfksFprF/Nc/rd1wRS1EI6nDBGyWAvDzx2Q=
Expand Down
27 changes: 27 additions & 0 deletions internal/cmd/boards/area/area.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package area

import (
"github.com/MakeNowJust/heredoc"
"github.com/spf13/cobra"
projectcmd "github.com/tmeckel/azdo-cli/internal/cmd/boards/area/project"
"github.com/tmeckel/azdo-cli/internal/cmd/util"
)

// NewCmd wires subcommands for managing area paths.
func NewCmd(ctx util.CmdContext) *cobra.Command {
cmd := &cobra.Command{
Use: "area <command>",
Short: "Manage area paths used by Azure Boards.",
Example: heredoc.Doc(`
# List the area paths for a project
azdo boards area project list Fabrikam
`),
Aliases: []string{
"a",
},
}

cmd.AddCommand(projectcmd.NewCmd(ctx))

return cmd
}
Loading
Loading