Skip to content

feat(issue): add --status/-s to assign and take - #151

Merged
bougyman merged 3 commits into
mainfrom
CRY-60-assign-take-set-status
Aug 18, 2026
Merged

feat(issue): add --status/-s to assign and take#151
bougyman merged 3 commits into
mainfrom
CRY-60-assign-take-set-status

Conversation

@bougyman

Copy link
Copy Markdown
Member

Summary

Implements CRY-60: allow lc issue assign and lc issue take to set a workflow state alongside the assignment in a single Linear issueUpdate mutation.

  • Ash action: Extended :assign with an optional state_id argument; Issue.Update.Assign conditionally includes stateId in the mutation input
  • CLI spec: Added --status/-s to both assign and take subcommands
  • issue assign: Resolves status name case-insensitively against the issue's team workflow states before calling the API; unknown/ambiguous names exit 22 before any mutation fires
  • issue take: Per-issue status resolution so different teams resolve the same name independently
  • Already-assigned fix: take --status bypasses the self-assigned shortcut so the state is always updated
  • Backward compatible: Omitting --status sends only assigneeId, exactly matching prior mutation shape

Examples

lc issue assign CRY-53 -a alice -s Todo
lc issue assign CRY-53 -a alice --status "In Progress"
lc issue take CRY-53 --status "In Progress"
lc issue take CRY-1 CRY-2 --status Todo

Test plan

  • --status on assign: exact match, prefix match, case-insensitive, short -s
  • --status on take: exact match, prefix match, case-insensitive, short -s
  • Single mutation contains both assigneeId and stateId
  • Assignment without --status sends only assigneeId (backward compat)
  • Unknown status exits 22 before any mutation fires
  • Already-self-assigned issue still updates status when take --status given
  • Multiple issues from different teams resolve the same status name independently
  • Bare issue number expansion with --status
  • --output json returns structured output including state
  • All 267 non-git tests pass

🤖 Generated with Claude Code

Allow `lc issue assign` and `lc issue take` to set a workflow state
alongside the assignment in a single Linear issueUpdate mutation.

- Extend the `:assign` Ash action with an optional `state_id` argument;
  `Issue.Update.Assign` conditionally adds `stateId` to the mutation input
- Add `--status`/`-s` to both `assign` and `take` CLI subcommand specs
- `issue assign` resolves the status name against the issue team's workflow
  states (case-insensitive, prefix match) before calling the API; invalid
  or ambiguous names exit 22 before any mutation fires
- `issue take` threads the status name through per-issue so each issue
  resolves against its own team's states (different teams can use different
  state IDs for the same name)
- The already-assigned shortcut in `gimme_da_issue!` is bypassed when a
  status is requested, so `take --status` always updates the state even
  when the caller is already the assignee
- Backward compatible: omitting `--status` sends only `assigneeId` with no
  `stateId` key in the mutation, matching existing behaviour exactly
- Updates Readme.adoc with examples and ash-domain-erd.adoc action inventory

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 23:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

bougyman and others added 2 commits August 18, 2026 19:42
Elixir formatter prefers |> on its own line; auto-fixed via mix format.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bougyman
bougyman merged commit 537f54b into main Aug 18, 2026
2 checks passed
@bougyman
bougyman deleted the CRY-60-assign-take-set-status branch August 18, 2026 23:49
This was referenced Aug 18, 2026
bougyman pushed a commit that referenced this pull request Aug 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.15.0](v1.14.0...v1.15.0)
(2026-08-19)


### Features

* **issue:** add --status/-s to assign and take
([#151](#151))
([537f54b](537f54b))


### Bug Fixes

* **api:** handle GraphQL partial-success responses cleanly (CRY-61)
([#150](#150))
([21d0363](21d0363))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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