From 80a2c57afb82ed296e3478d74c48d9b668d39486 Mon Sep 17 00:00:00 2001 From: Peter Schilling Date: Mon, 13 Jul 2026 21:20:33 -0700 Subject: [PATCH] feat(project): add --label to project update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a repeatable `--label` flag to `linear project update`, mirroring the existing `project create --label`: names resolve case-insensitively and an unknown label raises NotFoundError (no auto-create). The flag uses replace semantics — the supplied labels become the project's complete label set — consistent with `project update --team` and `issue update --label`. Empty/whitespace labels are rejected up front, and case-insensitive duplicates collapse to a single ID. The project-label lookup is extracted from project-create into a shared getProjectLabelIdByName helper in utils/linear.ts so create and update stay identical. This reshapes the update half of #226 to the repo's existing label conventions; the create half of #226 already shipped in #216, and the PR's auto-create/interactive-create behavior is intentionally dropped. Co-authored-by: KinomotoMio <200703522+KinomotoMio@users.noreply.github.com> --- skills/linear-cli/references/project.md | 3 +- src/commands/project/project-create.ts | 22 +- src/commands/project/project-update.ts | 44 ++- src/utils/linear.ts | 20 ++ .../__snapshots__/project-update.test.ts.snap | 10 + test/commands/project/project-create.test.ts | 6 +- test/commands/project/project-update.test.ts | 332 ++++++++++++++++++ 7 files changed, 410 insertions(+), 27 deletions(-) diff --git a/skills/linear-cli/references/project.md b/skills/linear-cli/references/project.md index 4dad294e..7ac54ec6 100644 --- a/skills/linear-cli/references/project.md +++ b/skills/linear-cli/references/project.md @@ -125,7 +125,8 @@ Options: -l, --lead - Project lead (username, email, or @me) --start-date - Start date (YYYY-MM-DD) --target-date - Target date (YYYY-MM-DD) - -t, --team - Team key (can be repeated for multiple teams) + -t, --team - Team key (can be repeated for multiple teams) + --label