feat(cli): add ado-aw status#596
Conversation
Implements PR 7 of the Phase 1 CLI overhaul. Renders per-pipeline
status — name, id, folder, queueStatus, latest-run summary, and a
deep link — one block per matched ADO definition. Read-only.
`status` is intentionally a thin renderer over the same data path as
`list` (same `list_definitions` + `match_definitions` +
`get_latest_build` sequence). The `--json` shape is byte-for-byte
identical to `list --json` so scripts can use either.
CLI surface:
ado-aw status [PATH] --org --project --pat --json
The block renderer is a pure function (`render_blocks`) tested
against six scenarios:
- empty → placeholder line
- succeeded run with url → all fields rendered
- run with no url → synthesizes
`{org_url}/{project}/_build/results?buildId={id}`
- no last run → "never" + no url line
- in-progress run (no `result` yet) → shows `status` value instead
- missing queueStatus → renders `?` placeholder
Depends on PR 5 (#594) for `crate::list::{ListRow, LastRun,
build_rows, render_json}`; reuses the `get_latest_build` ado/mod.rs
helper landed there.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Looks good overall — clean implementation, solid test coverage, well-scoped design. One redundant API call worth fixing. Findings🐛 Bugs / Logic Issues
|
|
@copilot address feedback and suggestions |
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/c7c2866a-891d-48c3-8336-774bba086817 Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Addressed in I fixed the review feedback by removing duplicate ADO definitions fetches in both Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot resolve the merge conflicts in this pull request |
Agent-Logs-Url: https://github.com/githubnext/ado-aw/sessions/4a073841-36db-4a76-8199-ee66398a346b Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Resolved in I merged |
Summary
Implements PR 7 of the Phase 1 CLI overhaul. Adds
ado-aw status [PATH]— denser per-pipeline status block (name, id, folder,queueStatus, latest-run summary, deep link) for every matched ADO definition. Read-only.CLI surface
Output (default)
Plumbing
render_blocks) with 6 unit tests covering empty input, succeeded runs, runs without URLs (synthesizes from org/project/buildId), absent last runs, in-progress runs (usesstatuswhenresultis missing), and missingqueueStatus.--jsondelegates tocrate::list::render_jsonso the JSON shape never drifts fromlist --json.crate::list::build_rowswithinclude_unmatched: false—--allis intentionally absent because the per-pipeline block format is only useful for matched definitions.Verified
cargo build✅cargo clippy --all-targets --all-features✅cargo test✅ — 6 new unit tests instatus.rs, 2 integration tests intests/status_integration.rs.Out of scope
PR 8 (
secrets), PR 9 (help-text grouping), PR 10 (doc overhaul).