diff --git a/docs/usage.md b/docs/usage.md index 7a19e60d..307905ff 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -159,6 +159,22 @@ update a specific issue: linear issue update TEAM-123 ``` +change labels: + +```bash +# Add a label, keeping existing labels +linear issue update TEAM-123 --add-label bug + +# Remove a label from this issue (does not delete it from the team) +linear issue update TEAM-123 --remove-label sprint-42 + +# Swap labels atomically in one update +linear issue update TEAM-123 --remove-label sprint-42 --add-label sprint-43 + +# Replace the entire label set +linear issue update TEAM-123 --label bug --label frontend +``` + #### other issue commands get issue id from current git branch: diff --git a/skills/linear-cli/SKILL.md b/skills/linear-cli/SKILL.md index 024a2fff..eadf0ee9 100644 --- a/skills/linear-cli/SKILL.md +++ b/skills/linear-cli/SKILL.md @@ -61,7 +61,10 @@ Write multi-line markdown to a file and pass `--description-file` (see the markd ```bash linear issue update ENG-123 --state "In Review" --assignee sam linear issue update ENG-123 --unassign -linear issue update ENG-123 --label infra --label security # replaces the label set +linear issue update ENG-123 --add-label security # add, keep existing labels +linear issue update ENG-123 --remove-label sprint-42 # detach; does not delete the label +linear issue update ENG-123 --remove-label sprint-42 --add-label sprint-43 # atomic swap +linear issue update ENG-123 --label infra --label security # replaces the label set ``` ### Add a comment diff --git a/skills/linear-cli/SKILL.template.md b/skills/linear-cli/SKILL.template.md index d65a2de1..dc69dc4d 100644 --- a/skills/linear-cli/SKILL.template.md +++ b/skills/linear-cli/SKILL.template.md @@ -61,7 +61,10 @@ Write multi-line markdown to a file and pass `--description-file` (see the markd ```bash linear issue update ENG-123 --state "In Review" --assignee sam linear issue update ENG-123 --unassign -linear issue update ENG-123 --label infra --label security # replaces the label set +linear issue update ENG-123 --add-label security # add, keep existing labels +linear issue update ENG-123 --remove-label sprint-42 # detach; does not delete the label +linear issue update ENG-123 --remove-label sprint-42 --add-label sprint-43 # atomic swap +linear issue update ENG-123 --label infra --label security # replaces the label set ``` ### Add a comment diff --git a/skills/linear-cli/references/issue.md b/skills/linear-cli/references/issue.md index 1131c17f..44591254 100644 --- a/skills/linear-cli/references/issue.md +++ b/skills/linear-cli/references/issue.md @@ -581,7 +581,11 @@ Options: --estimate - Points estimate of the issue -d, --description - Description of the issue --description-file - Read description from a file (preferred for markdown content) - -l, --label