feat: add tags CLI command (API parity)#82
Conversation
Adds the tags resource to the CLI with full CRUD support: - tags list - tags get <id> - tags create --tag-name <name> [--color <hex>] - tags update <id> [--tag-name <name>] [--color <hex>] - tags delete <id> Verified working against API with all operations.
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
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 |
|
🟢 |
borgesius
left a comment
There was a problem hiding this comment.
Looks reasonable. The tags client/commands line up with the v1 API shape and the update guard prevents empty PATCHes.
Summary
Adds the
coval tagscommand to the CLI, bringing it to parity with the/v1/tagsAPI endpoints.What's New
coval tags list— list all tagscoval tags get <id>— get a tag by IDcoval tags create --tag-name <name> [--color <hex>]— create a tagcoval tags update <id> [--tag-name <name>] [--color <hex>]— update a tagcoval tags delete <id>— delete a tagFiles Changed
src/client/models/tag.rs— Tag model with Tabular impl, request/response structssrc/commands/tags.rs— TagCommands with full CRUDsrc/client/mod.rs— TagsClient with list/get/create/update/deletesrc/client/models/mod.rs— registered tag modulesrc/commands/mod.rs— registered tags modulesrc/cli.rs— wired Tags commandVerification
All operations tested against Coval API (
cal-demoorg):cargo build— passescargo clippy— cleancargo test— 90/90 passGreptile Summary
This PR adds a
coval tagscommand that brings the CLI to parity with the/v1/tagsREST API, implementing full CRUD operations (list, get, create, update, delete) following the same structure used by every other resource command in the codebase.src/client/models/tag.rsdefines theTagmodel with aTabularimpl (all five fields rendered in the table), plus request/response structs.src/commands/tags.rsimplementsTagCommandswith theinput_jsonpattern shared across the project.src/client/mod.rsgainsTagsClient, andsrc/cli.rs/src/commands/mod.rs/src/client/models/mod.rsare updated to register the new module — all consistent with how prior resource commands were added.updatepath correctly guards against a no-op empty PATCH withanyhow::ensure!(!input.is_empty(), …), and.worktrees/has been added to.gitignore.Confidence Score: 5/5
Safe to merge — the changes are additive and follow established patterns throughout the codebase.
The new tags command is a straightforward structural addition that mirrors how every other resource command is wired in this project. The client methods, model structs, and command dispatch all follow the existing conventions exactly. The update path has an explicit guard against empty PATCH bodies,
.worktrees/is now gitignored, and theTagmodel'sTabularimpl exposes all five fields. No logic was changed in existing paths.No files require special attention.
Reviews (3): Last reviewed commit: "fix: address review comments" | Re-trigger Greptile