feat: add jira:sync-github command#220
Conversation
Add jira <> github sync command, helping users keep issues that are present in both systems in sync with each other. Signed-off-by: Calum Murray <cmurray@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Cali0707 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 |
|
Hi @Cali0707. Thanks for your PR. I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
WalkthroughThe changes introduce documentation and metadata for a new Jira plugin command, Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Pre-merge checks and finishing touches✅ Passed checks (7 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
plugins/jira/commands/sync-github.md (1)
163-163: Minor style refinement: "with success/failure/ignored counts" could be more concise.The phrase "Display sync results with success/failure/ignored counts" is slightly wordy. Consider "Display sync results summary and counts" or "Display sync results (success, failure, ignored)." This is optional and non-blocking.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (4)
PLUGINS.md(1 hunks)docs/data.json(2 hunks)plugins/jira/commands/sync-github.md(1 hunks)plugins/jira/skills/sync-github/SKILL.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
plugins/jira/skills/sync-github/SKILL.md
[uncategorized] ~250-~250: The official name of this software platform is spelled with a capital “H”.
Context: ... option ``` Track unselected issues in state.ignored_issues.jira_to_github for future filtering. ##### 4.2.2: Cr...
(GITHUB)
plugins/jira/commands/sync-github.md
[style] ~163-~163: ‘with success’ might be wordy. Consider a shorter alternative.
Context: ...tate Persistence - Display sync results with success/failure/ignored counts - **Save updated...
(EN_WORDINESS_PREMIUM_WITH_SUCCESS)
🪛 markdownlint-cli2 (0.18.1)
plugins/jira/skills/sync-github/SKILL.md
76-76: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
89-89: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
105-105: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
138-138: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
153-153: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
222-222: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
240-240: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
265-265: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
287-287: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
310-310: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
334-334: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
347-347: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
370-370: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
397-397: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
plugins/jira/commands/sync-github.md
10-10: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
214-214: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
221-221: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
226-226: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
231-231: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
236-236: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
241-241: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
246-246: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
252-252: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
264-264: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
285-285: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
316-316: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
357-357: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (5)
PLUGINS.md (1)
164-164: Command entry is well-integrated and consistent with the existing format.The new
/jira:sync-githubentry is properly placed, follows the established pattern for commands with optional and mutually exclusive arguments, and the description is clear.docs/data.json (1)
129-134: JSON structure and cross-file consistency are correct.Both the command and skill entries are properly formatted, consistently named (
sync-github), and align with the PLUGINS.md entry. The command synopsis and argument hint match exactly across files.Also applies to: 212-216
plugins/jira/skills/sync-github/SKILL.md (3)
12-12: CRITICAL directive is correct and important.The instruction "Do NOT proactively check prerequisites" (line 12) is the right approach—avoid blocking on missing tools before attempting to execute. Failures should trigger setup guidance via the Error Handling section. This aligns with pragmatic user experience and matches the command-doc's error-recovery model.
31-67: State schema design is solid and supports learned preferences and resumable workflows.The state schema (v1.0) properly tracks ignored issues (keyed by direction), sync history for auditing, and preferences (recent projects/epics/repos, project-repo associations, label/component mappings). This enables:
- Resumable workflows (users aren't re-prompted for previous choices)
- Ignore-list persistence (previously skipped items stay hidden unless
--include-ignored)- Learned mappings (label and component associations are reused across sessions)
- Cross-directory consistency (preferences follow the user, not the repo)
The schema merges well with existing state and gracefully evolves with future versions.
70-447: Implementation phases are well-structured, procedurally clear, and tool-call specifications are concrete.The five-phase breakdown is sound:
- Phase 1 (Source Selection): Clear prompts with learned preferences + fallback to recent items.
- Phase 2 (Data Collection): Work directory discovery, state loading, access validation, issue fetching (JIRA + GitHub), link extraction, and caching.
- Phase 3 (Semantic Matching): Multi-criteria scoring (existing links > JIRA-key mentions > title similarity > body similarity) with score threshold (≥50).
- Phase 4 (Sync Execution): Five sub-flows (JIRA→GitHub, GitHub→JIRA, Status Sync, PR Status Sync, Orphan PR sync) all using
AskUserQuestionfor selection + immediate execution.- Phase 5 (State & Reporting): Save state, generate report, offer retry.
Each step includes concrete tool-call signatures (e.g.,
mcp__atlassian__jira_search,gh issue list,mcp__atlassian__jira_transition_issue) and expected arguments. Batching logic for >4 items and error handling paths are specified. This gives a clear roadmap for implementation.
| jira:sync-github | ||
|
|
||
| ## Synopsis | ||
| ``` |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Add language specifiers to all fenced code blocks.
Multiple code blocks throughout the document lack language identifiers (e.g., ```bash instead of ```), which causes linting failures and reduces syntax highlighting clarity. Apply language identifiers consistently: bash for shell commands, json for JSON examples, and text for plain-text outputs.
Example fixes:
- Line 10:
```bash(for the Atlassian MCP setup) - Line 54:
```bash - Line 76:
```bash - Line 90:
```bash(for AskUserQuestion examples, though these might betext) - Lines 138, 153, 214, 221, 226, 231, 236, 241, 246, 252, 264, 285, 316, 357: Review context and apply
bash,text, orjsonas appropriate
Also applies to: 54-54, 76-76, 90-90, 105-105, 138-138, 153-153, 214-214, 221-221, 226-226, 231-231, 236-236, 241-241, 246-246, 252-252, 264-264, 285-285, 316-316, 357-357
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
10-10: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
|
|
||
| ### State Schema (v1.0) | ||
|
|
||
| ```json |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Add language specifiers to all fenced code blocks.
Similar to the command doc, multiple code blocks lack language identifiers. Apply consistently:
- Line 41:
```json(for state schema) - Lines 76, 89, 397:
```bash(for shell commands) - Lines 105, 138, 153, 222, 240, 265, 287, 310, 334, 347, 370:
```textor```markdown(for AskUserQuestion prompts and examples)
Also applies to: 76-76, 89-89, 105-105, 138-138, 153-153, 222-222, 240-240, 265-265, 287-287, 310-310, 334-334, 347-347, 370-370, 397-397
🤖 Prompt for AI Agents
In plugins/jira/skills/sync-github/SKILL.md around line 41 (and also apply to
lines 76, 89, 105, 138, 153, 222, 240, 265, 287, 310, 334, 347, 370, 397),
several fenced code blocks lack language identifiers; update each opening
triple-backtick to include the appropriate language specifier (e.g., ```json for
the state schema at line 41, ```bash for shell commands at 76, 89, 397, and
```text or ```markdown for AskUserQuestion prompts/examples at 105, 138, 153,
222, 240, 265, 287, 310, 334, 347, 370) so every fenced block has a correct
language tag.
|
/ok-to-test |
What this PR does / why we need it:
Many of us work with issues in upstream github communities as well as in JIRA, and it can be a lot to keep those two systems in sync. This PR adds a flow where claude interactively goes through both JIRA and a github repo and determines which issues you may want to sync. After confirmation, it goes through and does the sync for you.
Please always check what claude is doing before letting it create the issues for you! This is just meant to speed up the process of keeping these systems relatively in sync.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Note: I haven't tested this on repos/JIRA projects with very large issue counts
Checklist:
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.