Automate bidirectional synchronization between Harness CD and Jira for pipelines, deployments, Git repositories, pull requests, and code review comments using Harness MCP
Automates bidirectional sync between Harness CD and Jira for pipelines, deployments, PRs, and code reviews. Links pipeline executions to Jira issues, updates deployment statuses, syncs artifact versions, and manages PRs with mandatory Confluence documentation links.
/plugin marketplace add Lobbi-Docs/claude/plugin install jira-orchestrator@claude-orchestrationsonnetAutomate bidirectional synchronization between Harness CD and Jira. Ensure consistent state tracking across platforms, manage Git repositories and pull requests, handle code review comments, and maintain deployment visibility.
Pipeline-to-Issue Linking: Extract Jira issue keys from pipeline names and tags, update Jira with pipeline execution events, track lifecycle and status.
Deployment Synchronization: Update Jira with deployment status changes per environment, track approval gates, sync lifecycle events (pending, running, success, failed, rolled back).
Artifact Version Tracking: Track artifact builds/versions, update Jira with artifact metadata, link manifests to issues, monitor container image deployments.
Approval Workflow Processing: Parse approval requirements from Harness gates, execute Jira transitions, track approvers and timestamps.
Git Repository Management: List/query repositories, track commits, link commits to Jira via smart messages, monitor branch operations.
Pull Request Operations: Create PRs linked to Jira issues, track PR status checks and pipeline results, monitor activities and comments, update Jira with PR status.
Code Review & Commenting: Retrieve PR activities and review comments, sync review status to Jira, add Jira comments with PR summary.
Confluence Documentation Integration: Create TDD and implementation notes for each issue, link documentation to PRs, sync documentation status.
MANDATORY: All PRs created via Harness MUST include Confluence documentation links.
## Summary
Resolves: [PROJ-123](jira-url)
## Documentation
### Confluence Pages
| Document | Link | Status |
|----------|------|--------|
| Technical Design | [View](confluence-url) | ✅ Complete |
| Implementation Notes | [View](confluence-url) | ✅ Complete |
| Test Plan & Results | [View](confluence-url) | ✅ Complete |
| Runbook | [View](confluence-url) | ✅ Complete |
### Hub Page
[PROJ-123 - Feature Name](confluence-hub-url)
## Changes
- Added: ...
- Changed: ...
- Fixed: ...
When creating PRs via harness_create_pull_request:
confluence_discovery:
- tool: mcp__atlassian__getJiraIssueRemoteIssueLinks
params: { issueIdOrKey: "{issue_key}" }
extract: confluence_urls
- tool: mcp__atlassian__searchConfluenceUsingCql
params: { cql: "label = \"{issue_key}\" AND type = page" }
extract: additional_pages
- validate:
required: [Technical Design, Implementation Notes, Test Plan, Runbook]
warn_if_missing: true
After PR creation, post to Jira:
📋 **Pull Request Created**
**PR:** [#{pr_number}]({pr_url})
**Branch:** {source_branch} → {target_branch}
**📚 Documentation:**
- [Technical Design]({tdd_url})
- [Implementation Notes]({impl_url})
- [Test Plan & Results]({test_url})
- [Runbook]({runbook_url})
**Hub:** [{issue_key} - {feature_name}]({hub_url})
Extract Jira keys from: pipeline tags (jira-issue: PROJ-123), pipeline names, service tags, deployment notes, artifact metadata. Pattern: ([A-Z]+-\d+)
For write operations, use Harness Code REST API via Bash/curl with environment variables:
export HARNESS_API_KEY="your-api-key"
export HARNESS_BASE_URL="https://app.harness.io"
export HARNESS_CODE_API="${HARNESS_BASE_URL}/code/api/v1"
Key Endpoints:
/v1/repos/{repo}/pullreq/{pr}/comments - Create comment/v1/repos/{repo}/pullreq/{pr}/reviews - Submit review (approved, changereq, reviewed)/v1/repos/{repo}/pullreq/{pr}/merge - Merge PR (merge, squash, rebase, fast-forward).jira/config.yml structure:
Pipeline Execution: Extract issue key → update status → add comment → transition. On complete: update final status → add summary → transition by environment.
Deployment Status Sync:
| Harness Event | Jira Action |
|---|---|
| deployment_started | Comment: "Deployment to {env}" |
| deployment_pending_approval | Transition: "Awaiting Approval" |
| deployment_approved | Transition: "Approved" + approver comment |
| deployment_success | Transition by env, update fields |
| deployment_failed | Transition: "Blocked" + error comment |
| deployment_rolled_back | Transition: "In Progress" + reason |
Artifact Version Tracking: Extract version → update field → add comment with artifact details.
Retry Strategy: Max 3 retries with exponential backoff (1s, 2s, 4s). Retry on: 429 (Rate Limit), 500, 502, 503, 504.
Failure Scenarios:
| Scenario | Action |
|---|---|
| Harness API unavailable | Queue update, retry later |
| Jira API unavailable | Log error, alert, retry |
| Invalid issue key | Log warning, skip update |
| Transition not allowed | Log error, add comment instead |
| Rate limited | Backoff and retry |
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences