Skip to content

feat(issue-helpers): add move_issue/2 for moving an issue to a resolved project - #186

Merged
bougyman merged 1 commit into
mainfrom
EXT-8-add-move-issue
Aug 24, 2026
Merged

feat(issue-helpers): add move_issue/2 for moving an issue to a resolved project#186
bougyman merged 1 commit into
mainfrom
EXT-8-add-move-issue

Conversation

@bougyman

Copy link
Copy Markdown
Member

Summary

  • Add IssueHelpers.move_issue/2 that accepts a pre-resolved %Project{} struct and moves an issue to it via Linear.attach_issue_to_project/2, printing a confirmation message ("IDENTIFIER was moved to PROJECT_NAME")
  • Refactor attach_project/2 to delegate to move_issue/2 after resolving the search string, removing duplicated attachment logic
  • Update tests to reflect the new "was moved to" confirmation message (previously "was attached to")
  • Add 2 new unit tests for move_issue/2 directly (success + error propagation cases)

Test plan

  • mix test test/linear_cli/cli/issue_helpers_test.exs — all 36 tests pass (was 34)
  • mix ci from repo root — all checks pass (deps audit, format, credo, usage_rules, tests)
  • Existing attach_project/2 test still passes (confirmation message updated to match new behavior)
  • Existing update_issue/2 dispatch :project test still passes

Closes https://linear.app/the-rubyists/issue/EXT-8

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings August 24, 2026 09:55

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 bougyman left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Code Review

Branch: EXT-8-add-move-issue — 1 commit (32e518c)
Reviewer: automated code-review agent (Run 1)

Summary

Clean, minimal change that adds IssueHelpers.move_issue/2 and refactors attach_project/2 to delegate to it. The diff is small (~40 lines net), well-scoped, and follows existing patterns in the module exactly.

Quality Suite

All checks pass:

  • mix ci: deps audit, format, credo --strict, usage_rules, tests
  • 323 tests pass (2 new)
  • No compiler warnings

Issues Found

None critical or major.

Minor

  1. Docstring length (issue_helpers.ex:285-293) — The @doc on move_issue/2 is relatively verbose for a thin wrapper (8 lines of doc for 9 lines of code). The cross-reference to attach_project/2 is useful, but the first paragraph restates what the typespec already says. Not a blocker — project convention seems to favor thorough docs.

What Looks Good

  • Correct delegation pattern: attach_project/2 now delegates to move_issue/2 cleanly. The resolution-then-delegate split is the right abstraction boundary — resolution stays in attach_project, move+feedback lives in move_issue.
  • Message consistency: "was moved to" aligns with the CLI help text (--project described as "Project to move the issue to"). Good decision documented in the workpad.
  • Test coverage: Both happy path and error propagation are tested for move_issue/2 directly. Existing attach_project/2 and update_issue/2 dispatch tests updated for the new message text. Tests follow the module's established stub_responses + capture_io pattern.
  • No nil-crash regression: The faithfully-ported nil-crash risk in attach_project/2 (when project_for returns nil) is unchanged — project.id in move_issue/2 will raise the same KeyError as the old inline project.id did. The doc correctly notes this.
  • ERD unaffected: No new Ash resource, action, or code interface was added — only a CLI-layer helper. The domain ERD does not need updating.
  • Typespec accurate: @spec move_issue(%Linear.Issue{}, %Linear.Project{}) :: {:ok, %Linear.Issue{}} | {:error, term()} matches the implementation.

Overall Assessment

Approve. The change is correct, well-tested, follows project conventions, and the CI suite is green. No issues that warrant requesting changes.

…ed project

Add IssueHelpers.move_issue/2, which takes a pre-resolved %Project{}
struct and calls Linear.attach_issue_to_project/2 with a confirmation
message. Refactor attach_project/2 to delegate to move_issue/2 after
resolving the search string, removing duplicated attachment logic.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bougyman
bougyman force-pushed the EXT-8-add-move-issue branch from 32e518c to b1d9d97 Compare August 24, 2026 10:00
@bougyman
bougyman merged commit 6c43e39 into main Aug 24, 2026
2 checks passed
@bougyman
bougyman deleted the EXT-8-add-move-issue branch August 24, 2026 10:00
bougyman pushed a commit that referenced this pull request Aug 25, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.5.0](v2.4.0...v2.5.0)
(2026-08-24)


### Features

* **issue-helpers:** add move_issue/2 for moving an issue to a resolved
project ([#186](#186))
([6c43e39](6c43e39))
* **issue:** add --from/--to bulk project-to-project mode to lc issue
move ([#189](#189))
([bbb2df3](bbb2df3))
* **issue:** add lc issue move subcommand
([#187](#187))
([51cd1f7](51cd1f7))

---
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