Skip to content

refactor(cli): extract issue lifecycle actions into CLI.Issue.Actions - #267

Merged
ruby-automation merged 1 commit into
mainfrom
EXT-49-extract-issue-lifecycle-actions
Sep 11, 2026
Merged

ruby-automation merged 1 commit into
mainfrom
EXT-49-extract-issue-lifecycle-actions

Conversation

@ruby-automation

Copy link
Copy Markdown
Contributor

Summary

  • Extracts issue_comment/2, cancel_issue/2, close_issue/2, move_issue/2, attach_project/2, update_description/2, and update_issue/2 (plus their private helpers state_for/3, maybe_comment/2, dispatch_update/2, no_action_taken/0, normalize/1) from LinearCli.CLI.IssueHelpers into the new LinearCli.CLI.Issue.Actions module.
  • Wires cancel_issue/2 and close_issue/2 through CLI.Issue.WorkflowStates (from EXT-48) for cancelled/completed state selection.
  • Updates the two production call sites in Commands (issue_update/1 and maybe_add_status_comment/2).
  • Moves 21 focused tests to test/linear_cli/cli/issue/actions_test.exs.
  • The :pr dispatch path temporarily calls IssueHelpers.issue_pr/2 until EXT-51 extracts the PR workflow.

Closes EXT-49. Part of the Phase 18 plan.

Test plan

  • mix precommit passes (format, credo strict, 493 tests)
  • All 21 extracted tests pass in the new actions_test.exs
  • Remaining issue_helpers_test.exs tests still pass
  • Command-level tests unchanged (wiring reaches same GraphQL boundary)

🤖 Generated with Claude Code

Move issue_comment/2, cancel_issue/2, close_issue/2, move_issue/2,
attach_project/2, update_description/2, and update_issue/2 (plus their
private helpers) from LinearCli.CLI.IssueHelpers into the new
LinearCli.CLI.Issue.Actions module. Wire Actions.cancelled_state_for/2
and completed_state_for/2 through the WorkflowStates module from EXT-48.
Update the two Commands call sites; move 21 focused tests to
test/linear_cli/cli/issue/actions_test.exs. The :pr dispatch path
temporarily calls IssueHelpers.issue_pr/2 until EXT-51 extracts it.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ruby-automation
ruby-automation merged commit f416469 into main Sep 11, 2026
3 checks passed
@ruby-automation
ruby-automation deleted the EXT-49-extract-issue-lifecycle-actions branch September 11, 2026 23:56
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.

1 participant