Skip to content

feat: add jira:sync-github command#220

Open
Cali0707 wants to merge 1 commit intoopenshift-eng:mainfrom
Cali0707:add-jira-sync-command
Open

feat: add jira:sync-github command#220
Cali0707 wants to merge 1 commit intoopenshift-eng:mainfrom
Cali0707:add-jira-sync-command

Conversation

@Cali0707
Copy link

@Cali0707 Cali0707 commented Dec 11, 2025

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:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.

Summary by CodeRabbit

  • New Features

    • Added JIRA-GitHub Issue Sync command enabling bidirectional synchronization of issues between JIRA and GitHub with automatic content sanitization and status updates.
  • Documentation

    • Added comprehensive documentation covering the sync-github command, multi-phase implementation workflow, state management, and error handling scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

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>
@openshift-ci openshift-ci bot requested review from bryan-cox and dgoodwin December 11, 2025 22:19
@openshift-ci
Copy link

openshift-ci bot commented Dec 11, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Cali0707
Once this PR has been reviewed and has the lgtm label, please assign zaneb for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 11, 2025
@openshift-ci
Copy link

openshift-ci bot commented Dec 11, 2025

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions 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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 11, 2025

Walkthrough

The changes introduce documentation and metadata for a new Jira plugin command, sync-github, which synchronizes issues bidirectionally between JIRA and GitHub. This includes command definitions, data schema entries, comprehensive command documentation, and detailed skill implementation guidance covering five implementation phases with interactive workflows.

Changes

Cohort / File(s) Summary
Plugin command and metadata registration
PLUGINS.md, docs/data.json
Added new Jira plugin command definition and skill metadata for sync-github with options for project/epic filtering, repository targeting, date-based filtering, and flags for including ignored issues and pull requests.
Command documentation
plugins/jira/commands/sync-github.md
Added comprehensive documentation for the jira:sync-github command, detailing five-phase implementation guidance, prerequisites, argument syntax, return values, usage examples, error handling scenarios, security considerations, and state management.
Skill implementation guide
plugins/jira/skills/sync-github/SKILL.md
Added detailed skill documentation outlining multi-phase bidirectional synchronization workflow, state schema and operations, semantic matching logic, data collection procedures, interactive sync execution flows, status updates, error handling, and best practices.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Verify command and metadata entries follow established conventions and naming patterns
  • Confirm documentation clarity and completeness of workflow descriptions
  • Check consistency between command definition, metadata, and documentation

Pre-merge checks and finishing touches

✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add jira:sync-github command' directly and clearly summarizes the main change—adding a new Jira plugin command for synchronizing issues between JIRA and GitHub.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
No Real People Names In Style References ✅ Passed No references to real people's names found in style references, plugin commands, skill documentation, example prompts, or instructions across all PR files.
No Assumed Git Remote Names ✅ Passed Thorough search of all new/modified files found no hardcoded git remote names like 'origin' or 'upstream' in documentation or skill files.
Git Push Safety Rules ✅ Passed PR adds Jira-GitHub issue sync plugin documentation with no git push commands, force push operations, or automated pushes to main/master branches detected.
No Untrusted Mcp Servers ✅ Passed PR references official Atlassian MCP server as prerequisite but introduces no untrusted MCP server installations, npm packages, or arbitrary repository references.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between f0e0326 and 9596657.

📒 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-github entry 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 AskUserQuestion for 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
```
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ 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 be text)
  • Lines 138, 153, 214, 221, 226, 231, 236, 241, 246, 252, 264, 285, 316, 357: Review context and apply bash, text, or json as 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
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ 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: ```text or ```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.

@zaneb
Copy link
Contributor

zaneb commented Dec 18, 2025

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 18, 2025
@coderabbitai coderabbitai bot mentioned this pull request Jan 9, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants