Skip to content

feat(project): add --label flag to project create and update#226

Closed
KinomotoMio wants to merge 1 commit into
schpet:mainfrom
KinomotoMio:feat/project-labels
Closed

feat(project): add --label flag to project create and update#226
KinomotoMio wants to merge 1 commit into
schpet:mainfrom
KinomotoMio:feat/project-labels

Conversation

@KinomotoMio

Copy link
Copy Markdown
Contributor

Summary

  • Adds repeatable --label <label> to linear project create and linear project update for Linear ProjectLabel IDs.
  • Resolves project labels case-insensitively and creates missing labels via projectLabelCreate without forcing a color.
  • Keeps project update --label additive by preserving current project label IDs and appending new ones.
  • Adds interactive project label selection for project create -i, including a create-new option.

Test plan

  • npx --yes deno@2.7.9 task codegen
  • npx --yes deno@2.7.9 task check
  • npx --yes deno@2.7.9 lint
  • TZ=UTC npx --yes deno@2.7.9 task test (337 passed, 5 ignored)
  • TZ=UTC npx --yes deno@2.7.9 test --allow-all --quiet test/commands/project/project-create.test.ts test/commands/project/project-update.test.ts

schpet added a commit that referenced this pull request Jul 14, 2026
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>
@schpet

schpet commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Thanks for this, @KinomotoMio — closing as superseded, but your project update --label work lives on.

Here's how it shook out:

  • project create --label — the create-side of this PR shipped independently in feat(project): support overview content on create #216 (which exposed --label/--member/--priority/etc. on project create), so that half is already on main.
  • project update --label — this was the genuinely-missing piece, and it just landed in feat(project): add --label to project update #243, reshaped to match the repo's existing label conventions: replace semantics (consistent with project update --team and issue update --label), case-insensitive resolution, and NotFound on a missing label rather than auto-creating. We grounded the replace-vs-additive-vs-delta decision in prior art (gh --add-label/--remove-label, glab --label/--unlabel, kubectl label) — happy to revisit gh-style add/remove deltas as a future repo-wide change across issue + project update.

The projectLabelCreate auto-create and interactive "create new label" behavior from this PR were intentionally dropped to keep labels consistent with the rest of the CLI (nothing else auto-creates labels). Your contribution is credited via Co-authored-by on #243. 🙏

@schpet schpet closed this Jul 14, 2026
@KinomotoMio
KinomotoMio deleted the feat/project-labels branch July 14, 2026 05:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants