Skip to content

Conversation

@ztrayner
Copy link
Contributor

Summary

Adds linear issue relation command with subcommands for managing issue relations/dependencies:

  • add - Create relations between issues
  • remove - Remove existing relations
  • list - List all relations for an issue

Supported Relation Types

Type Description Example
blocks Issue blocks another linear issue relation add ENG-123 blocks ENG-456
blocked-by Issue is blocked by another linear issue relation add ENG-123 blocked-by ENG-100
related Issues are related linear issue relation add ENG-123 related ENG-456
duplicate Issue is duplicate of another linear issue relation add ENG-123 duplicate ENG-100

Examples

# Mark ENG-123 as blocked by ENG-100
linear issue relation add ENG-123 blocked-by ENG-100

# Mark ENG-123 as blocking ENG-456
linear issue relation add ENG-123 blocks ENG-456

# List all relations for an issue
linear issue relation list ENG-123

# Remove a relation
linear issue relation remove ENG-123 blocked-by ENG-100

Implementation Notes

  • The blocked-by relation type is implemented by reversing the issue order with the blocks API type, providing a more intuitive CLI experience
  • Uses existing utilities (getIssueIdentifier, getIssueId) for consistent issue resolution
  • Follows the existing command structure and patterns in the codebase

Motivation

This enables CLI users to manage issue dependencies, which is useful for:

  • Automating issue management in scripts
  • AI agents that need to set up dependency relationships
  • Quick dependency management without leaving the terminal

@ztrayner ztrayner force-pushed the feature/issue-relations branch from 37295f1 to 34368f0 Compare January 30, 2026 06:18
Adds `linear issue relation` command with subcommands:
- `add` - Create relations between issues (blocks, blocked-by, related, duplicate)
- `remove` - Remove existing relations
- `list` - List all relations for an issue

Examples:
  linear issue relation add ENG-123 blocked-by ENG-100
  linear issue relation add ENG-123 blocks ENG-456
  linear issue relation list ENG-123

The `blocked-by` relation type is implemented by reversing the issue order
with the `blocks` API type, providing a more intuitive CLI experience.
@ztrayner ztrayner force-pushed the feature/issue-relations branch from 34368f0 to 8e18736 Compare January 30, 2026 06:19
Copy link
Owner

@schpet schpet left a comment

Choose a reason for hiding this comment

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

awesome, thanks. one small ask for changing 'remove' to delete

})

const removeRelationCommand = new Command()
.name("remove")
Copy link
Owner

Choose a reason for hiding this comment

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

i think this cli and the api generally uses 'delete' over remove, can this be changed to 'delete' ?

@tava-zach
Copy link

Thanks for the feedback! Renamed remove to delete in 42f7a05 to match the CLI/API conventions.

@schpet schpet merged commit bd007f3 into schpet:main Jan 30, 2026
7 checks passed
@schpet
Copy link
Owner

schpet commented Jan 30, 2026

@tava-zach thank you! appreciate you upstreaming this ✌🏻

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.

3 participants