feat: issue label read, create, update, and delete commands#112
feat: issue label read, create, update, and delete commands#112flipbit03 merged 15 commits intoflipbit03:mainfrom
Conversation
|
Hey @lightstrike, great work on the labels CRUD! A couple of design thoughts before we merge: 1. Remove We think 2. Labels should be referenced by name, not ID Throughout the CLI, labels should be shown and set by name, not UUID:
This keeps things consistent with how the CLI handles teams (by key), assignees (by name/me), statuses (by name), etc. — always human-readable identifiers, never raw UUIDs, unless unavoidable (e.g. parent-child relationships between labels and group labels) We'll push these changes directly to your branch. |
- Remove `labels read` command and `issueLabel` query (low value — you'd only know the UUID after listing, and listing already shows everything) - Add labels to IssueSummary, SearchSummary, and IssueDetail as name-only (no UUIDs) via nested LabelConnection - Add labels column to issue list/search table output - Update --labels doc to say "names" not "names or UUIDs" - Remove LabelDetail and LabelParentRef types (no longer needed)
When creating an issue with --team and --labels, resolve_label_ids now fetches both team-scoped and workspace-wide labels. Previously workspace labels were invisible when a team filter was active. Adds online test for labels with spaces in names.
- labels list now shows the parent label name column - labels update supports --clear-parent to remove parent relationship - labels create/update with --parent auto-promotes the parent to a group (Linear requires is_group=true before a label can have children) - Adds online test for parent set/list/clear lifecycle
- labels create: add --group flag to create a group label
- labels update: add --group/--group false to promote/demote
(demoting fails if label still has children)
- labels list: show group column ("yes" or empty)
- Remove auto-promotion of parent labels to groups
- Test covers full lifecycle: create group, add child, list,
clear parent, demote group
- Remove id column (labels are referenced by name, not UUID) - Rename group → is_label_group, parent → parent_label for clarity - Sort output: groups first with children underneath, then standalone labels
Label names aren't globally unique — two different teams can have the same label name. UUIDs are needed for --parent, update, and delete.
- SDK: add comment_update/resolve/unresolve, issue_batch_update, issue_vcs_branch_search, issue_label_create/update/delete - CLI: add labels CRUD, issues batch-update/find-branch, comments update/resolve/unresolve, estimate flags - Top-level: split Labels into its own row, update Issues and Comments rows with new subcommands
Clearer intent: --make-label-group promotes a label to a group, --clear-label-group demotes it back. No ambiguous boolean parameter.
…ear-parent-label-group All label group flags are now fully explicit and self-documenting: --parent-label-group, --clear-parent-label-group, --make-label-group, --clear-label-group
labels now serializes as ["Bug", "Feature"] instead of the
GraphQL-leaking { nodes: [{ name: "Bug" }, ...] } structure.
- Fix issue tests using --parent-label-group instead of --parent (labels flag was incorrectly applied to issue parent operations during rename) - Add exponential backoff to retry_with_backoff (0, 1, 2, 4, 8, 10s cap) - Add settle() helper for post-creation eventual consistency delays - Add run_lineark_with_retry() for transient "conflict on insert" errors - Apply settle() after create_test_team() for API propagation - Apply run_lineark_with_retry to all project creation calls - Increase retry count for search-dependent unarchive test
|
Update: all changes are pushed. Here's what I added on top of your commit:
Full suite passes: 64 CLI + 40 SDK + 11 blocking online tests. |
Summary
issueLabelCreate,issueLabelUpdate,issueLabelDeletemutations andissueLabelsquery tooperations.tomland regenerate SDKlineark labels list [--team KEY]— list all issue labels (includes team key)lineark labels create <NAME> [--team KEY] [--color HEX] [--description TEXT] [--parent ID]— create a labellineark labels update <ID> [--name TEXT] [--color HEX] [--description TEXT] [--parent ID]— update a labellineark labels delete <ID>— delete a label--labels NAME,...flag onissues create,issues update, andissues batch-updatefor setting labels by name--label-by adding|replacing|removingand--clear-labelsflags for label managementissues list,issues search,issues read)LabelGuardfor test cleanupChanges from original PR
labels read— low value since you'd only know the UUID after listing, and listing already shows everything usefulissueLabelquery fromoperations.toml— no longer neededIssueSummary,SearchSummary, andIssueDetailnow include label names (not IDs) via nestedLabelConnection--labelsdoc updated — says "names" not "names or UUIDs"TeamGuardpattern for self-containmentTest plan
make check— clean (lint, doc, build, column alignment)make test— all 203 offline tests passissue_label_create_update_and_deletelabels_list_json_returns_array,labels_list_json_includes_team_field,labels_create_update_and_deleteall pass