Skip to content

feat(boards): ✨ Implement azdo boards work-item show command - #330

Merged
tmeckel merged 15 commits into
masterfrom
tmeckel/issue238
Aug 15, 2026
Merged

feat(boards): ✨ Implement azdo boards work-item show command#330
tmeckel merged 15 commits into
masterfrom
tmeckel/issue238

Conversation

@tmeckel

@tmeckel tmeckel commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Closes #238

Summary

Implements azdo boards work-item show [ORG:]PROJECT/ID following the hardened spec in #238 (decisions 1-16), plus a repo-wide cleanup.

New command

  • boards work-item show with aliases view / status
  • Fetches the work item with Expand=All in a single call (fields, relations, links)
  • Verifies the work item belongs to the requested project before rendering
  • Format-aware description rendering: Markdown passes through, Html is converted to Markdown via html-to-markdown/v2; legacy items without a format map fall back to Html
  • --comments / --relations toggles for the comment thread and relations block
  • --json / --jq / --template export of the raw work item payload
  • Deviation from the issue description: no --raw flag - --raw was removed repo-wide (pr view, pipelines agent/pool show, boards iteration show, boards work-item show)

Supporting changes

  • internal/azdo.GetWorkItemEnvelope: low-level fetch capturing multilineFieldsFormat, which the vendored SDK WorkItem model drops (decision 15)
  • Dependency: html-to-markdown/v2 added (+ transitive upgrades: goldmark, x/net, go-colorful); spew removed
  • scripts/checkin.sh: retry a failed commit only when a pre-commit hook modified staged files; abort instantly on fatal hook failures and on typos hook modifications (never retry); topologically sorted commit sequence
  • .pre-commit-config.yaml: vendor/ excluded from all hooks (yamllint failed on vendored yaml)

Verification

  • go test ./... - pass
  • make lint - 0 issues
  • make docs - regenerated

tmeckel added 15 commits August 15, 2026 19:31
Add html-to-markdown/v2 v2.5.2 for Html→Markdown description rendering
in the boards work-item show command (issue #238 decision 16), along with
the forced transitive upgrades (goldmark v1.8.2, golang.org/x/net v0.55.0,
go-colorful v1.4.0). Drop spewerspew/spew: the --raw flags it served were
removed repo-wide.
Add GetWorkItemEnvelope, a low-level fetch that captures the raw work item
payload including the multilineFieldsFormat map the vendored WorkItem model
drops (issue #238 decision 15). The show command uses it to detect whether
the description is Markdown or Html.
Add the Go text template rendering work item details: url, id, rev, type,
state, reason, title, assignments, timestamps, area, iteration, tags,
format-aware description, and optional relations/comments blocks.
Implement azdo boards work-item show [ORG:]PROJECT/ID (issue #238): fetches
the work item with Expand=All, verifies it belongs to the requested project,
renders the description format-aware (Markdown pass-through, Html converted
via html-to-markdown) and supports --comments, --relations and JSON export.
Deviation from the issue: no --raw flag.
Register show.NewCmd under boards work-item and add an example line
showing how to view a work item with its comment thread.
Drop the --raw/-r flag and the spew dump path; the command now renders
template or JSON output only.
Drop the --raw/-r flag and the spew dump path; the command now renders
template or JSON output only.
Drop the --raw/-r flag and the spew dump path; the command now renders
template or JSON output only.
Drop the --raw/-r flag and the spew dump path; the command now renders
template or JSON output only.
Hermetic gomock tests covering target parsing, ID validation, Expand=All
fetch, project-membership guard, format-aware description rendering (incl.
Html→Markdown conversion), --comments/--relations toggles, JSON output,
scope parsing and error paths.
Remove TestRunShow_RawFlag and assert the raw flag is no longer registered.
Regenerated command reference: new boards work-item show page with JSON
fields, updated work-item/pr/pipelines/iteration pages without the --raw
flag, refreshed help reference index.
Previously the script retried commits whenever any pre-commit hook modified staged files. The typos hook is now detected explicitly; if it rewrote files the check-in aborts so the fixes can be reviewed. A hook that fails without touching files is also treated as a fatal error immediately instead of consuming retry attempts.
@tmeckel tmeckel changed the title feat(boards): ✨ Implement azdo boards work-item show command (#238) feat(boards): ✨ Implement azdo boards work-item show command Aug 15, 2026
@tmeckel
tmeckel merged commit 0e137da into master Aug 15, 2026
4 of 5 checks passed
@tmeckel
tmeckel deleted the tmeckel/issue238 branch August 15, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Implement azdo boards work-item show command

1 participant