Skip to content

feat(comments): add unresolve CLI subcommand to reopen threads - #8

Open
Millon15 wants to merge 1 commit into
zach-snell:mainfrom
Millon15:feat/cli-comment-unresolve
Open

feat(comments): add unresolve CLI subcommand to reopen threads#8
Millon15 wants to merge 1 commit into
zach-snell:mainfrom
Millon15:feat/cli-comment-unresolve

Conversation

@Millon15

Copy link
Copy Markdown
Contributor

What

Adds a bbkt prs comments unresolve <pr-id> <comment-id> CLI subcommand to reopen a resolved review thread.

Why

The terminal could already resolve a thread (prs comments resolve), and both the bitbucket client (UnresolvePRComment) and the MCP unresolve action already reopen one — but the CLI had no matching subcommand. A CLI user who resolved a thread had to switch to the browser to reopen it. This closes that asymmetry.

How

  • New prCommentsUnresolveCmd, mirroring resolve exactly (same arg shape [workspace] [repo-slug] <pr-id> <comment-id>, same ParseArgs/validation), calling the existing client.UnresolvePRComment (DELETE on the …/comments/{id}/resolve sub-resource).
  • Registered under prs comments; added to the command-group examples and Short.
  • README + CLI reference docs updated to list unresolve.

No new client/MCP code — this is purely the missing CLI surface over functionality that already shipped.

Tests

  • TestUnresolvePRComment_SendsDelete — asserts the client issues DELETE …/comments/99/resolve.
  • TestUnresolvePRComment_ValidatesRequiredFields — table test over the four missing-field cases.
go build ./...   # ok
go vet ./...      # ok
gofmt -l …        # clean
go test ./...     # ok (cmd/cli + internal/bitbucket green)

Notes

Branches off main and is independent of the other open PRs (resolve {}-body fix, list-resolution, --all) — no shared functions, merges in any order.

The bitbucket client (UnresolvePRComment) and the MCP `unresolve` action
already reopen a resolved thread, but the CLI had no matching subcommand —
users could resolve a thread from the terminal yet had to switch to the
browser to reopen one.

Wire `bbkt prs comments unresolve <pr-id> <comment-id>`, mirroring resolve
(DELETE on the resolve sub-resource). Update the README and CLI reference.

Adds tests asserting the client DELETEs .../comments/{id}/resolve and
validates its required fields.
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