feat(pr): add +comments, +comment-edit, +comment-delete #385

Merged
wbtiger merged 1 commits from Taoyouce/gitlink-cli:feat/pr-comment-crud into master 2026-07-14 22:22:47 +08:00

1 Commits

Author SHA1 Message Date
1os21ka23r9navae6mrro cf42b86f65 feat(pr): add +comments, +comment-edit, +comment-delete
Completes the pull-journal comment lifecycle. The CLI could only
create PR comments (via the linked issue's journals); the dedicated
v1 pull journals endpoints also support list/update/destroy:

- pr +comments -i <num>: list a PR's journals
- pr +comment-edit -i <num> -c <journal-id> -b <text> [-s state]
- pr +comment-delete -i <num> -c <journal-id>

The server's UpdateService hard-requires state in
opened|resolved|disabled (omitting it fails with
'State不包含于列表中'), so +comment-edit always sends state,
defaulting to opened, with client-side validation of the enum.
--comment-id is integer-validated.

Production-verified full lifecycle on gitlink.org.cn:
create -> list -> edit (note updated) -> delete. 3 unit tests,
README examples, bilingual i18n keys.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-07-08 14:43:26 +00:00