Skip to content

feat(get): richer detail view with description and opt-in comments - #27

Merged
jonas1307 merged 1 commit into
mainfrom
feat/get-details
Jul 29, 2026
Merged

feat(get): richer detail view with description and opt-in comments#27
jonas1307 merged 1 commit into
mainfrom
feat/get-details

Conversation

@jonas1307

Copy link
Copy Markdown
Owner

Richer get detail view

Enhances devops get with more context and a working link.

Changes

  • Fixed the browser URL. It was built with a string-replace on the API url (_apis/wit/workitems -> _workitems/edit), which failed because the API returns workItems (capital I) and the project GUID — leaving the raw JSON endpoint. It is now built from the configured org + project name and opens the item directly.
  • More fields in the detailed view: area, iteration, tags, parent, reason, and the HTML-stripped description.
  • --comments (long-only) fetches and shows the discussion via the work item comments API. It is opt-in to keep the extra (preview) API call off the default path, and best-effort — a failure never breaks get. Comments are separated by a blank line.
  • --output json/csv is unchanged (flat field projection).

Adds ActionHelpers.WorkItemUrl and HtmlToText with unit tests (72 total).

The comments endpoint uses api-version=7.1-preview.4 and hasn't been exercised against a live org; if it 404s, comments are silently skipped.

- Fix the browser URL: build it from org + project name instead of a fragile
  string-replace on the API url (which left the raw JSON endpoint).
- Show area, iteration, tags, parent, reason and the HTML-stripped description.
- Add --comments (long-only) to also fetch the discussion via the work item
  comments API, best-effort so a failure never breaks 'get'. Comments are opt-in
  to keep the extra API call off the default path; blank line between each.
- --output json/csv modes are unchanged (flat field projection).

Adds ActionHelpers.WorkItemUrl and HtmlToText with unit tests.
@jonas1307
jonas1307 merged commit 34b62da into main Jul 29, 2026
1 check passed
@jonas1307
jonas1307 deleted the feat/get-details branch July 29, 2026 18:52
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.

1 participant