feat(labels): add issue label CRUD commands - #232
Conversation
4df82c3 to
f6f7e62
Compare
f6f7e62 to
1000884
Compare
Refs DBL-191
The label removal feature landed with inline --label-mode validation, but next centralized label-mode parsing in common/domain-values. Extend the shared LabelMode/parseLabelMode with the 'remove' mode and have the issues and projects update commands consume it instead of duplicating validation. Part of linearis-oss#117
next reworked GraphQLClient.request() to infer the result and variables from the TypedDocumentNode, so explicit single type arguments no longer type-check. Drop them from the issue-label CRUD service functions and let the document drive the types, matching the rest of the services. Part of linearis-oss#117
1000884 to
5590498
Compare
|
Thanks for this, @doublerebel — really solid groundwork. The command → resolver → service → GraphQL layering is clean, the scoping (issue-label CRUD + attach/remove for issues and projects, with project-label definition CRUD and hierarchy left as explicit non-goals) is sensible, and the test coverage matched it well. Since the branch had drifted a fair way behind
I also retargeted the PR base from Everything's green now: |
✅ knip — no dead codeNo unused files, exports, types, or dependencies detected. |
Gate the description field on `!== undefined` so an explicit `labels update <x> --description ""` clears the description instead of being dropped by the truthiness check.
Bug Description
linearis labels listcan discover labels, but the CLI could not create or manage issue labels. It also lacked precise label detachment coverage on the objects that can receive labels.Changes Made
create,read,update, anddeletesubcommands underlinearis labels.issues update --labels <labels> --label-mode removewhile preservingadd,overwrite, and--clear-labels.projects create --labels,projects update --labels,projects update --labels --label-mode add|remove|overwrite, andprojects update --clear-labels.Scope / Non-goals
This PR implements issue-label CRUD plus attach/remove coverage for the two managed labelable object contexts currently exposed by Linearis: issues and projects. It does not add project-label definition CRUD, parent-label management, or hierarchy editing.
Tests
npm run check:cinpx tsc --noEmitnpm testnpm run buildnode dist/main.js labels usagenode dist/main.js issues usagenode dist/main.js projects usageReview Note
The command path follows the existing Linearis layering: command -> resolver -> service -> generated GraphQL operation. Services accept pre-resolved UUIDs only; commands keep validation and output handling at the CLI boundary.
Refs #117