feat(relations): add multi-target issue relation creation - #252
Merged
Conversation
Implements `lc issue relation add ISSUE RELATED_ISSUE... --type TYPE` (alias: `a`) per the Phase 16 plan decomposition 2. - IssueRelation.Create ManualCreate calls issueRelationCreate mutation, detects duplicate-relation GraphQL errors and returns :duplicate_relation - create_issue_relation/3 code interface added to LinearCli.Linear domain - `add` subcommand with --type option (blocks/blocked-by/related/duplicate) and allow_unknown_args: true for variadic related-issue list - blocked-by reverses wire endpoints: each RELATED_ISSUE becomes issueId, ISSUE becomes relatedIssueId, wire type is "blocks" - Per-target processing: self-link rejected, duplicate treated as no-op, partial failures reported and exit non-zero - Display.relation_to_plain/1 helper for JSON output - Unit tests at resource, domain, CLI command, and alias levels - ERD updated with :create action and create_issue_relation interface Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- relation type "related" now renders "is now related to" (not "related of") - relation type "duplicate" now renders "is now a duplicate of" (not "duplicate of") - JSON error output now includes the actual error message (truncated at 200 chars) via relation_add_error_message/1 instead of a generic placeholder - add truncate_message/2 helper for message length safety Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Sep 6, 2026
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
lc issue relation add ISSUE RELATED_ISSUE... --type TYPE(alias:a) per Phase 16 plan decomposition 2blocked-byreverses wire endpoints: eachRELATED_ISSUEbecomesissueId,ISSUEbecomesrelatedIssueId, wire type is"blocks"Implementation details
IssueRelation.CreateManualCreate callsissueRelationCreatemutation; duplicate-relation GraphQL errors detected by message pattern and return{:duplicate_relation, msg}for safe no-op handlingcreate_issue_relation/3code interface added toLinearCli.Lineardomainaddsubcommand with required--typeoption (parser validatesblocks/blocked-by/related/duplicate) andallow_unknown_args: truefor variadic related-issue listDisplay.relation_to_plain/1public helper for JSON output of create results{target, status, relation}structure:createaction andcreate_issue_relationcode interfaceTest plan
create_issue_relation/3domain tests: successful creation, related type, API error, duplicate detection, wire variablesissue relation addcommand tests: blocks/blocked-by/related, multiple targets, duplicate no-op, self-link rejection, partial failure, JSON outputnormalize_subcommand_aliasestest:aalias →addforissue relationCloses EXT-41
🤖 Generated with Claude Code