feat(presets): add jira cloud my-issues source support - #110
Conversation
|
@coderabbitai review |
✅ Action performedReview finished.
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughChangesJira integration
MCP transport and polling robustness
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
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (10)
README.mdexamples/config.yamlservice/actions.jsservice/poller.jsservice/presets/index.jsservice/presets/jira.yamlservice/repo-config.jstest/unit/poll-service.test.jstest/unit/poller.test.jstest/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 thedefaults,repos_dir,sources, andtoolssections.
Files:
examples/config.yaml
README.md
📄 CodeRabbit inference engine (AGENTS.md)
Before committing, update
README.mdwhen 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!
| 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 | ||
| ``` |
There was a problem hiding this comment.
🗄️ 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 testRepository: 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.jsRepository: 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.
| response_key: issues | ||
| mappings: | ||
| title: summary | ||
| number: key | ||
| state: status | ||
| updated_at: updated | ||
| body: description |
There was a problem hiding this comment.
🗄️ 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: maptitle,state,updated_at, andbodyfromfields.summary,fields.status.name,fields.updated, andfields.description; retainnumber: 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-L124test/unit/repo-config.test.js#L498-L515test/unit/repo-config.test.js#L539-L563
Source: Coding guidelines
No description provided.