feat: add bl issue comment count/show and comment notification list/add#64
feat: add bl issue comment count/show and comment notification list/add#64
Conversation
- bl issue comment count <key> — GET /api/v2/issues/{key}/comments/count
- bl issue comment show <key> <comment-id> — GET /api/v2/issues/{key}/comments/{id}
- bl issue comment notification list <key> <comment-id> — GET notifications
- bl issue comment notification add <key> <comment-id> --notified-user-id <id> — POST notifications
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds comment-focused Backlog API endpoints and CLI commands: comment count, show, notification list, and notification add, including data structures, client trait wiring, CLI handlers, tests, and documentation updates. Changes
Sequence Diagram(s)sequenceDiagram
participant CLI as CLI (bl)
participant Client as BacklogClient
participant API as Backlog API (HTTP)
participant Server as Backlog Server
CLI->>Client: count_issue_comments(key) / get_issue_comment(...)
Client->>API: HTTP GET/POST /issues/{key}/comments/...
API->>Server: handle request, fetch data
Server-->>API: response JSON
API-->>Client: parsed structs (IssueCommentCount / IssueComment / IssueCommentNotification[])
Client-->>CLI: return Result
CLI->>CLI: render text or pretty JSON
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
✨ Simplify code
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds missing Backlog issue comment endpoints/commands to the Rust-based bl CLI, expanding the issue comment command group with count/show and comment-notification management.
Changes:
- Added new CLI subcommands:
bl issue comment count,bl issue comment show, andbl issue comment notification {list,add}(with clap wiring). - Extended the API layer with issue comment count/comment show/notification list+add methods and corresponding structs, including
httpmocktests. - Updated English/Japanese command documentation and the endpoint coverage table.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/api/issue.rs |
Adds IssueCommentCount / IssueCommentNotification types and 4 BacklogClient methods + httpmock tests. |
src/api/mod.rs |
Extends BacklogApi trait with new methods and delegates them in impl BacklogApi for BacklogClient. |
src/main.rs |
Adds clap subcommands/enums and dispatch for the new issue comment operations. |
src/cmd/issue/comment/mod.rs |
Registers new comment subcommand modules and re-exports count/show. |
src/cmd/issue/comment/count.rs |
Implements bl issue comment count command logic + unit tests. |
src/cmd/issue/comment/show.rs |
Implements bl issue comment show command logic + unit tests. |
src/cmd/issue/comment/notification/mod.rs |
New module wiring for notification add/list. |
src/cmd/issue/comment/notification/list.rs |
Implements notification listing + formatting + unit tests. |
src/cmd/issue/comment/notification/add.rs |
Implements notification add + unit tests. |
website/docs/commands.md |
Adds documentation sections for new commands and marks endpoints as implemented. |
website/i18n/ja/docusaurus-plugin-content-docs/current/commands.md |
Japanese documentation parity for new commands + coverage table updates. |
You can also share your feedback on Copilot code review. Take the survey.
… tests - IssueCommentNotificationAddArgs::new → try_new; bail when notified_user_ids is empty (consistent with project validation-layer convention in AGENTS.md) - MockApi captures params so tests can assert notifiedUserId[] key/value pairs
Checklist
mainSummary
bl issue comment count <key>— GET /api/v2/issues/{key}/comments/countbl issue comment show <key> <comment-id>— GET /api/v2/issues/{key}/comments/{id}bl issue comment notification list <key> <comment-id>— GET /api/v2/issues/{key}/comments/{id}/notificationsbl issue comment notification add <key> <comment-id> --notified-user-id <id>— POST /api/v2/issues/{key}/comments/{id}/notificationsReason for change
Implements missing issue comment endpoints (closes #46 area).
Changes
src/api/issue.rs: addIssueCommentCountandIssueCommentNotificationstructs + 4 newBacklogClientmethods + httpmock testssrc/api/mod.rs: add 4 trait methods with defaultunimplemented!()+BacklogApi for BacklogClientdelegatessrc/cmd/issue/comment/count.rs: new —bl issue comment countsrc/cmd/issue/comment/show.rs: new —bl issue comment showsrc/cmd/issue/comment/notification/: new —listandaddsubcommandssrc/main.rs: clap wiring for new subcommandswebsite/docs/commands.md,website/i18n/ja/.../commands.md: docs + coverage table updatedNotes
Reimplementation from scratch on current
main(previous draft PR #59 had widespread conflicts due toBacklogApidefault impl refactor in #63).