mirror of
https://github.com/4ier/notion-cli.git
synced 2026-09-14 20:17:00 +08:00
5ec113f07f
Wraps two endpoints added in Notion's 2025 API that the CLI didn't yet expose: - PATCH /v1/comments/:id → 'notion comment update <id> --text ...' - DELETE /v1/comments/:id → 'notion comment delete <id> [<id> ...]' 'update' reuses the existing buildCommentRichText helper so the --mention-user flag works the same way as 'comment add'. 'delete' follows the 'block delete' pattern: variadic args, per-id error isolation, and a summary line (N comment(s) deleted). When the target id is the anchor of a discussion, Notion removes the whole thread; deleting a reply removes just that one comment — this is documented in the Long help. Two new client methods (UpdateComment, DeleteComment) keep the API plumbing in internal/client alongside AddComment. Smoke-tested against a real workspace: create comment → update text → verify new text via 'comment get' → delete → raw DELETE on the same id returns object_not_found as expected (the synchronous GET path is eventually consistent server-side, which is a Notion behavior, not a CLI issue). Closes #33