Skip to content

feat(presets): add jira cloud my-issues source support - #110

Open
c0bra wants to merge 4 commits into
athal7:mainfrom
c0bra:feat/jira
Open

feat(presets): add jira cloud my-issues source support#110
c0bra wants to merge 4 commits into
athal7:mainfrom
c0bra:feat/jira

Conversation

@c0bra

@c0bra c0bra commented Feb 23, 2026

Copy link
Copy Markdown

No description provided.

@athal7 athal7 self-assigned this Jul 17, 2026
@athal7

athal7 commented Jul 29, 2026

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added Jira Cloud presets, including “My Issues” and research-focused issue tracking.
    • Added Jira issue mappings, JQL customization, MCP tool configuration, and multiple-source examples.
    • Added support for Jira MCP server aliases and configurable issue fields.
  • Bug Fixes

    • Improved local MCP transport configuration and environment handling.
    • Increased the session response timeout to reduce premature timeout errors.
    • Improved state reprocessing for falsy or non-string values.
  • Documentation

    • Added Jira Cloud setup instructions, authentication guidance, and configuration examples.

Walkthrough

Changes

Jira integration

Layer / File(s) Summary
Jira preset definitions and configuration
service/presets/*, README.md, examples/config.yaml
Registers Jira presets, defines Jira mappings and JQL queries, and documents configuration and authentication examples.
Jira provider configuration and mapping
service/repo-config.js, test/unit/repo-config.test.js
Aliases mcp-atlassian to Jira and merges user mappings with Jira preset defaults.
Jira polling and action integration
service/poller.js, test/unit/poll-service.test.js, test/unit/poller.test.js, test/unit/repo-config.test.js
Maps Jira responses into normalized items, supports Jira preset expansion, validates tools, and preserves source working-directory action settings.

MCP transport and polling robustness

Layer / File(s) Summary
MCP transport setup
service/poller.js
Infers transport types and supports local command arrays, additional arguments, command validation, and expanded environment variables.
Request timeout and state handling
service/actions.js, service/poller.js, test/unit/poller.test.js
Increases the response-header timeout and handles non-null falsy or non-string state values safely.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SourceConfig
  participant Poller
  participant MCPAtlassian
  SourceConfig->>Poller: Jira source and tool configuration
  Poller->>MCPAtlassian: jira_search with JQL
  MCPAtlassian-->>Poller: Jira issue array
  Poller->>Poller: Apply Jira mappings and item templates
  Poller-->>SourceConfig: Normalized items and action configuration
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so the intent is not described in the author-written description. Add a short description explaining the Jira Cloud preset and related config/test updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding Jira Cloud my-issues source support.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5f450718-babf-432d-8ab0-71c0ce19cda3

📥 Commits

Reviewing files that changed from the base of the PR and between 1d70ece and 2316521.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (10)
  • README.md
  • examples/config.yaml
  • service/actions.js
  • service/poller.js
  • service/presets/index.js
  • service/presets/jira.yaml
  • service/repo-config.js
  • test/unit/poll-service.test.js
  • test/unit/poller.test.js
  • test/unit/repo-config.test.js
📜 Review details
🧰 Additional context used
📓 Path-based instructions (2)
examples/config.yaml

📄 CodeRabbit inference engine (AGENTS.md)

Keep the configuration documentation consistent with the supported config file at ~/.config/opencode/pilot/config.yaml, including the defaults, repos_dir, sources, and tools sections.

Files:

  • examples/config.yaml
README.md

📄 CodeRabbit inference engine (AGENTS.md)

Before committing, update README.md when changes affect configuration options, CLI commands, installation or setup steps, service management, or sources and polling behavior.

Files:

  • README.md
🔇 Additional comments (8)
service/presets/index.js (1)

63-63: LGTM!

service/repo-config.js (1)

290-301: LGTM!

Also applies to: 314-341

test/unit/repo-config.test.js (1)

767-783: LGTM!

Also applies to: 1015-1039

test/unit/poll-service.test.js (1)

90-108: LGTM!

Also applies to: 402-436

test/unit/poller.test.js (1)

626-635: LGTM!

Also applies to: 1183-1251, 1345-1398, 1440-1479

service/poller.js (2)

175-183: LGTM!

Also applies to: 193-231


1286-1288: LGTM!

service/actions.js (1)

36-36: LGTM!

Comment thread README.md
Comment on lines +132 to +140
If your Jira MCP server uses a different name, override the default contract:

```yaml
sources:
- preset: jira/my-issues
tool:
mcp: your-jira-mcp-server
name: your_jira_search_tool
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
ast-grep outline service/repo-config.js --items all
rg -n -C 3 '\bgetToolProviderConfig\s*\(|\bgetToolMappings\s*\(' service test

Repository: athal7/opencode-pilot

Length of output: 7986


🏁 Script executed:

#!/bin/bash
sed -n '210,330p' service/repo-config.js
printf '\n---\n'
sed -n '120,170p' service/poll-service.js

Repository: athal7/opencode-pilot

Length of output: 5906


Keep Jira mappings tied to the documented MCP name. The example switches tool.mcp to an arbitrary server name, but the runtime only aliases mcp-atlassian to jira. Add a note that custom names need their own tools.<custom-server>.mappings, or keep the example aligned with the aliased name.

Comment thread service/presets/jira.yaml
Comment on lines +5 to +11
response_key: issues
mappings:
title: summary
number: key
state: status
updated_at: updated
body: description

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Fix the Jira mapping contract. Jira responses used by the polling tests store values under fields, but the preset maps flattened paths; the example also reverses the normalized target fields. Default Jira polling therefore produces missing normalized title/state/updated fields.

  • service/presets/jira.yaml#L5-L11: map title, state, updated_at, and body from fields.summary, fields.status.name, fields.updated, and fields.description; retain number: key.
  • examples/config.yaml#L116-L124: document the same normalized target fields and nested source paths.
  • test/unit/repo-config.test.js#L498-L515: assert the corrected preset mapping paths.
  • test/unit/repo-config.test.js#L539-L563: assert merged defaults using the corrected mapping paths.

As per coding guidelines, keep the configuration documentation consistent with the supported config file, including the sources and tools sections.

📍 Affects 3 files
  • service/presets/jira.yaml#L5-L11 (this comment)
  • examples/config.yaml#L116-L124
  • test/unit/repo-config.test.js#L498-L515
  • test/unit/repo-config.test.js#L539-L563

Source: Coding guidelines

@athal7 athal7 assigned c0bra and unassigned athal7 Jul 29, 2026
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