feat(jira): add MCP backend for issues-by-component command#592
feat(jira): add MCP backend for issues-by-component command#592asood-rh wants to merge 3 commits into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: asood-rh The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis PR is a documentation-only update introducing a selectable dual backend ( ChangesDual backend documentation for jira:issues-by-component
Estimated code review effort: 2 (Simple) | ~12 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 10✅ Passed checks (10 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
plugins/jira/skills/jira-issues-by-component-mcp/SKILL.md (1)
33-40: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd language tags to the fenced examples.
These bare fences trigger MD040. Mark the prose example, JSON blocks, and pseudocode fence explicitly.
🛠 Suggested fix
-``` +```textApply the same pattern to the JSON examples (
```json) and the pseudocode block (```textor```pseudo).Also applies to: 58-63, 158-182
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@plugins/jira/skills/jira-issues-by-component-mcp/SKILL.md` around lines 33 - 40, The fenced examples in SKILL.md are missing language tags and trigger MD040; update each bare fence in the affected sections to use an explicit tag based on the content. In the prose/example blocks around the MCP backend note, use a text-style fence, and in the JSON and pseudocode examples later in the file, use the appropriate json and text/pseudo tags. Locate the affected snippets by the MCP backend guidance and the other fenced examples mentioned in the review, and make the same change consistently across them.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/jira/commands/issues-by-component.md`:
- Around line 114-125: The backend flow has an incorrect step reference: the API
path in the “Determine Backend” section points to a non-existent “Step 3a.”
Update the API branch text to refer to the later “Fetch Issues” subsection
instead, and keep the MCP path and connectivity-check guidance in the same
section aligned with the existing workflow structure.
In `@plugins/jira/skills/jira-issues-by-component-mcp/SKILL.md`:
- Around line 174-181: The capped-result branch is checking an undefined
`total`, so the 500-issue warning never works correctly. Update the pagination
logic in the Jira issues-by-component skill to use the accumulated fetched count
or the MCP response’s total-result field instead of `total`, and keep the
`capped` flag/warning tied to that valid value.
- Around line 84-87: The top-3 retention logic in the Jira component aggregation
is using separate checks for priority and updated time, which can evict a
better-ranked issue; align it with the documented sort order. Update the
aggregation in the skill flow that keeps top issues per component so it uses a
single comparator based on the same descending `(priority, updated)` ranking and
only retains the best three entries. Keep the stored fields limited to `key`,
`summary`, `priority.name`, and `status.name`, and apply the comparator
consistently wherever issues are inserted or replaced.
---
Nitpick comments:
In `@plugins/jira/skills/jira-issues-by-component-mcp/SKILL.md`:
- Around line 33-40: The fenced examples in SKILL.md are missing language tags
and trigger MD040; update each bare fence in the affected sections to use an
explicit tag based on the content. In the prose/example blocks around the MCP
backend note, use a text-style fence, and in the JSON and pseudocode examples
later in the file, use the appropriate json and text/pseudo tags. Locate the
affected snippets by the MCP backend guidance and the other fenced examples
mentioned in the review, and make the same change consistently across them.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b9f4ecad-fb4f-4f93-ba1c-dfd33bcf2e0b
📒 Files selected for processing (6)
.claude-plugin/marketplace.jsondocs/index.htmlplugins/jira/.claude-plugin/plugin.jsonplugins/jira/README.mdplugins/jira/commands/issues-by-component.mdplugins/jira/skills/jira-issues-by-component-mcp/SKILL.md
1d42bcd to
086fe2c
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@plugins/jira/skills/jira-issues-by-component-mcp/SKILL.md`:
- Around line 84-87: The top-3 aggregation in the SKILL.md guidance is dropping
`updated`, which prevents the documented priority/updated tie-break from being
applied consistently on later pages. Update the retained payload for the
component top-3 logic to keep `updated` alongside `key`, `summary`,
`priority.name`, and `status.name` in the ranking path, and only discard it
after the final ordering is settled. Make sure the instructions for the
aggregation step reference the top-3 replacement logic so the comparator can
still evaluate “then updated descending” correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: d3f5d462-a6e0-4c37-b840-50a45924720f
📒 Files selected for processing (4)
docs/index.htmlplugins/jira/README.mdplugins/jira/commands/issues-by-component.mdplugins/jira/skills/jira-issues-by-component-mcp/SKILL.md
✅ Files skipped from review due to trivial changes (1)
- plugins/jira/README.md
Add --backend mcp|api flag to /jira:issues-by-component. The MCP backend (default) uses the Atlassian MCP server with OAuth browser login, requiring zero env var setup. Falls back to the existing API backend for datasets exceeding 500 issues. Both backends produce identical reports and support all existing flags including --search. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Arti Sood <asood@redhat.com>
- Add `updated` to top-3 retained fields so priority/updated tie-break works across pages - Fix "Step 3a" reference to "Step 3, then Step 4b" in backend flow - Capture `totalAvailable` from MCP response so 500-issue cap warning fires correctly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
93956b4 to
e217b0d
Compare
e217b0d to
24c557e
Compare
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Add --backend mcp|api flag to /jira:issues-by-component.
The MCP backend (default) uses the Atlassian MCP server with OAuth browser login, requiring zero env var setup.
Falls back to the existing API backend for datasets exceeding 500 issues.
Both backends produce identical reports and support all existing flags including --search.
What this PR does / why we need it:
Which issue(s) this PR fixes:
Enhances the slash command to provide additional option to use the jira:issues-by-component
Special notes for your reviewer:
Checklist:
Summary by CodeRabbit
New Features
Documentation