feat(issue): add +comments, +comment-edit, +comment-delete #384

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

What

Completes the comment (journal) lifecycle for issues. The CLI could only create comments; the v1 journals endpoints (Api::V1::Issues::JournalsController) also support list/update/destroy:

# List comments, with the server-side filters from query_params
gitlink-cli issue +comments --owner Gitlink --repo forgeplus -n 123 --category comment --keyword lgtm

# Edit / delete a comment by journal ID
gitlink-cli issue +comment-edit --owner Gitlink --repo forgeplus -n 123 -c 484049 -b "Updated"
gitlink-cli issue +comment-delete --owner Gitlink --repo forgeplus -n 123 -c 484049
  • +comments exposes --keyword and --category comment|operate (both straight from the controller's query_params) plus standard paging; the response includes the server's comment/operate journal counts.
  • --comment-id is integer-validated client-side before any API call.
  • Edit sends {"notes": ...} matching journal_params.

Validation

  • Production-verified full lifecycle on gitlink.org.cn: create → list (comment count reflects it) → edit → delete, all status: 0 (test issue cleaned up afterwards).
  • 3 unit tests (paths, query shape, payload, integer guard); go test ./..., go vet, gofmt all clean.
  • README examples and bilingual i18n keys included.
## What Completes the comment (journal) lifecycle for issues. The CLI could only *create* comments; the v1 journals endpoints (`Api::V1::Issues::JournalsController`) also support list/update/destroy: ```bash # List comments, with the server-side filters from query_params gitlink-cli issue +comments --owner Gitlink --repo forgeplus -n 123 --category comment --keyword lgtm # Edit / delete a comment by journal ID gitlink-cli issue +comment-edit --owner Gitlink --repo forgeplus -n 123 -c 484049 -b "Updated" gitlink-cli issue +comment-delete --owner Gitlink --repo forgeplus -n 123 -c 484049 ``` - `+comments` exposes `--keyword` and `--category comment|operate` (both straight from the controller's `query_params`) plus standard paging; the response includes the server's comment/operate journal counts. - `--comment-id` is integer-validated client-side before any API call. - Edit sends `{"notes": ...}` matching `journal_params`. ## Validation - Production-verified full lifecycle on gitlink.org.cn: create → list (comment count reflects it) → edit → delete, all `status: 0` (test issue cleaned up afterwards). - 3 unit tests (paths, query shape, payload, integer guard); `go test ./...`, `go vet`, `gofmt` all clean. - README examples and bilingual i18n keys included.
Taoyouce added 4 commits 2026-07-08 22:38:56 +08:00
443b135f47 feat(issue): add +comments, +comment-edit, +comment-delete
Completes the journal (comment) lifecycle for issues. The CLI could
only create comments; the v1 journals endpoints also support listing,
updating, and deleting:

- issue +comments -n <num>: list journals with the server's filters
  (--keyword, --category comment|operate, paging)
- issue +comment-edit -n <num> -c <journal-id> -b <text>
- issue +comment-delete -n <num> -c <journal-id>

--comment-id is integer-validated before any API call.

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

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
wbtiger merged commit c5f0a02192 into master 2026-07-14 22:22:49 +08:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Gitlink/gitlink-cli#384
No description provided.