refactor(cli): extract issue lifecycle actions into CLI.Issue.Actions - #267
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
issue_comment/2,cancel_issue/2,close_issue/2,move_issue/2,attach_project/2,update_description/2, andupdate_issue/2(plus their private helpersstate_for/3,maybe_comment/2,dispatch_update/2,no_action_taken/0,normalize/1) fromLinearCli.CLI.IssueHelpersinto the newLinearCli.CLI.Issue.Actionsmodule.cancel_issue/2andclose_issue/2throughCLI.Issue.WorkflowStates(from EXT-48) for cancelled/completed state selection.Commands(issue_update/1andmaybe_add_status_comment/2).test/linear_cli/cli/issue/actions_test.exs.:prdispatch path temporarily callsIssueHelpers.issue_pr/2until EXT-51 extracts the PR workflow.Closes EXT-49. Part of the Phase 18 plan.
Test plan
mix precommitpasses (format, credo strict, 493 tests)actions_test.exsissue_helpers_test.exstests still pass🤖 Generated with Claude Code