diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c2142bc..72e60cf8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - `issue query --state` and `issue mine --state` accept a workflow state name or ID as well as the six state types, looked up within the queried team scope (all teams under `--all-teams`, where a name matches every team's same-named state). An unknown name errors and lists the scope's states, and types and names can be mixed - `project update --content ` and `--content-file ` replace a project's long-form overview body, matching the flags `project create` already had. Previously the only way to change the body after creation was a hand-written `projectUpdate` mutation through `linear api` - `issue update --clear-due-date`, `--clear-estimate`, `--clear-parent`, `--clear-project`, and `--clear-milestone`, plus `project update --clear-lead`, `--clear-start-date`, and `--clear-target-date`, to remove a value the way `--unassign` and `--clear-cycle` already do. Each sends an explicit `null` to Linear and errors when combined with its set flag; `--clear-project` also rejects `--milestone`, since a milestone belongs to the project being removed. Previously these fields could only be changed, never cleared: cliffy treats `--due-date ""` as a missing value +- `project update` now changes teams, labels, and initiatives with the same three operations `issue update` has for labels: `--team`, `--label`, and `--initiative` replace the whole set, `--add-team`/`--add-label`/`--add-initiative` append, and `--remove-team`/`--remove-label`/`--remove-initiative` detach, all repeatable, with a replace flag rejected alongside its add/remove flags. Linear's project input only accepts a full `teamIds`/`labelIds` list, so add and remove read the project's current set (every page of it) and send the computed set; initiatives have no input field at all and go through the initiative-to-project link mutations, so `project update` previously could not change them after `project create --initiative`. Removing a team, label, or initiative the project does not have errors and lists what it does have, and a link change that fails part-way reports what was applied and what is still pending - `--json` (`-j`) on `team list`, `cycle list`, `cycle view`, `milestone list`, `milestone view`, and `project view`, the last read commands without machine-readable output. List commands emit the same `{ nodes, pageInfo }` connection shape as the other list commands, after the same filtering and ordering as the table; view commands emit the GraphQL object as fetched, including every issue rather than the ten-item preview, and `milestone view --all --json` includes every page. (A 2.0.0 entry claimed `cycle list --json`; that change never actually landed.) ([#276](https://github.com/schpet/linear-cli/issues/276); thanks @lakardion) ### Fixed diff --git a/README.md b/README.md index 6e62c1f0..e9c4e328 100644 --- a/README.md +++ b/README.md @@ -204,6 +204,8 @@ linear project create --name "API v2" --team ENG --content-file overview.md linear project create --name "Mobile launch" --team APP --priority high --label Launch --member jane@example.com linear project update --content-file overview.md # replace the project's overview body linear project update --clear-lead --clear-target-date # remove values (also --clear-start-date) +linear project update --add-team OPS --remove-label Launch --add-initiative "Q4 Bets" # change teams, labels, initiatives incrementally +linear project update --team ENG --team OPS # replace the whole team set (--label and --initiative replace likewise) linear project comment list # list the project's discussion thread (UUID, slug, or name) linear project comment add --body "Kickoff Monday" # comment on a project linear project comment add --body "+1" --reply-to # reply in a thread diff --git a/docs/usage.md b/docs/usage.md index 2982021b..1356845c 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -317,6 +317,15 @@ linear project update PROJECT-ID --content-file overview.md # Remove the lead, start date, or target date (each conflicts with its set flag) linear project update PROJECT-ID --clear-lead --clear-start-date --clear-target-date + +# Teams, labels, and initiatives are sets. --team, --label, and --initiative +# replace the whole set; --add-*/--remove-* change it incrementally. All are +# repeatable, and a replace flag cannot be combined with its add/remove flags. +linear project update PROJECT-ID --add-team OPS --remove-team APP +linear project update PROJECT-ID --add-label Launch --remove-label Beta +linear project update PROJECT-ID --add-initiative "Q4 Bets" # ID, slug, or name +linear project update PROJECT-ID --initiative "Q4 Bets" --initiative "Platform" # exactly these +# Removing a team, label, or initiative the project does not have is an error. ``` #### list projects diff --git a/skills/linear-cli/references/organization-features.md b/skills/linear-cli/references/organization-features.md index 318c6c3a..2d2328f2 100644 --- a/skills/linear-cli/references/organization-features.md +++ b/skills/linear-cli/references/organization-features.md @@ -56,6 +56,15 @@ linear project view linear project create --name "New Feature" --team DEV linear project create --name "Q1 Work" --team DEV --initiative "Q1 Goals" linear project create -i # Interactive mode + +# Change a project's teams, labels, or initiatives incrementally +linear project update --add-team OPS --remove-team APP +linear project update --add-label "Launch" --remove-label "Beta" +linear project update --add-initiative "Q1 Goals" # ID, slug, or name + +# Replace a whole set (cannot be combined with that set's --add-*/--remove-*) +linear project update --team DEV --team OPS +linear project update --initiative "Q1 Goals" --initiative "Platform" ``` ## Bulk Operations diff --git a/skills/linear-cli/references/project.md b/skills/linear-cli/references/project.md index 78715273..1ec28cfb 100644 --- a/skills/linear-cli/references/project.md +++ b/skills/linear-cli/references/project.md @@ -191,23 +191,37 @@ Description: Options: - -h, --help - Show this help. - --workspace - Target workspace (uses credentials) - -n, --name - Project name - -d, --description - Project description (max 255 characters, enforced by Linear's API) - -f, --description-file - Read project description from file (still subject to the 255-character API - limit) - --content - Project overview markdown - --content-file - Read project overview markdown from a file - -s, --status - Status (planned, started, paused, completed, canceled, backlog) - -l, --lead - Project lead (username, email, or @me). Use --clear-lead to remove it - --clear-lead - Remove the project's lead (cannot be combined with --lead) - --start-date - Start date (YYYY-MM-DD). Use --clear-start-date to remove it - --clear-start-date - Remove the project's start date (cannot be combined with --start-date) - --target-date - Target date (YYYY-MM-DD). Use --clear-target-date to remove it - --clear-target-date - Remove the project's target date (cannot be combined with --target-date) - -t, --team - Team key, name, or ID (can be repeated for multiple teams) - --label