Skip to content

feat: implement bi-directional Linear/Jira integration#421

Merged
echobt merged 1 commit intomasterfrom
feature/linear-jira-integration
Jan 27, 2026
Merged

feat: implement bi-directional Linear/Jira integration#421
echobt merged 1 commit intomasterfrom
feature/linear-jira-integration

Conversation

@echobt
Copy link
Contributor

@echobt echobt commented Jan 27, 2026

Summary

This PR implements the AGENT 5 mission for Linear and Jira integration with full bi-directional sync capabilities for the Cortex CLI.

Changes

Linear Client Enhancements (cortex-engine/src/linear/)

  • Added URL and short reference parsing with regex patterns (e.g., LIN-123, https://linear.app/team/issue/LIN-123)
  • Implemented retry logic with exponential backoff (3 retries, 100ms initial delay)
  • Added write operations:
    • create_issue() - Create new issues with full field support
    • add_comment() - Add comments to issues
    • update_issue_state() - Change issue status
    • update_issue_priority() - Change issue priority
    • update_issue_assignee() - Assign/unassign users
  • Added enrich_context() method for automatic ticket detail enrichment
  • Added LinearRef type for extracted references
  • Added CreateIssueInput type for issue creation
  • Comprehensive test coverage (10 tests)

New Jira Client (cortex-engine/src/jira/)

  • Complete REST API client supporting both Jira Cloud and Server/Data Center
  • URL parsing for:
    • Cloud: https://company.atlassian.net/browse/PROJ-123
    • Server: https://jira.company.com/browse/PROJ-123
  • Rate limiting (500 requests per 5 minutes for Jira Cloud)
  • Retry logic with exponential backoff for transient failures
  • Full CRUD operations:
    • get_issue() / get_issue_details() - Fetch issue information
    • create_issue() - Create new issues
    • update_issue() - Update issue fields
    • add_comment() - Add comments
  • Workflow operations:
    • get_transitions() - List available transitions
    • transition_issue() - Change issue status
  • assign_issue() - Assign/unassign users
  • search_issues() - JQL query support
  • ADF (Atlassian Document Format) text extraction
  • enrich_context() for automatic ticket detail enrichment
  • Comprehensive test coverage (9 tests)

Module Integration

  • Added jira module to cortex-engine/src/lib.rs
  • Added comprehensive re-exports for both Linear and Jira types

Testing

  • All 19 unit tests pass (10 Linear + 9 Jira)
  • cargo check passes
  • cargo fmt applied

Related

Resolves: ORCHESTRATE/AGENT_5_LINEAR_JIRA.md

This implements AGENT 5 mission for Linear and Jira integration with
bi-directional sync capabilities.

## Linear Client Enhancements (cortex-engine/src/linear/)
- Added URL and short reference parsing with regex patterns
- Implemented retry logic with exponential backoff (3 retries)
- Added write operations: create_issue, add_comment, update_issue_state,
  update_issue_priority, update_issue_assignee
- Added context enrichment with enrich_context() method
- Added LinearRef type for extracted references
- Added CreateIssueInput type for issue creation
- Comprehensive test coverage (10 tests)

## New Jira Client (cortex-engine/src/jira/)
- Complete REST API client for Jira Cloud and Server/Data Center
- URL parsing for both Cloud (atlassian.net) and Server deployments
- Rate limiting (500 req/5min for Jira Cloud)
- Full CRUD operations: get_issue, create_issue, update_issue, add_comment
- Workflow operations: get_transitions, transition_issue
- JQL search support with search_issues()
- ADF (Atlassian Document Format) text extraction
- Context enrichment similar to Linear
- Comprehensive test coverage (9 tests)

## Module Integration
- Added jira module to cortex-engine/src/lib.rs
- Added comprehensive re-exports for both Linear and Jira types

Resolves: ORCHESTRATE/AGENT_5_LINEAR_JIRA.md
@echobt echobt merged commit ecd0a4f into master Jan 27, 2026
3 of 4 checks passed
@echobt echobt deleted the feature/linear-jira-integration branch January 27, 2026 22:25
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