Skip to content

feat: add raise-pr and bug-fix skills with Jira integration (v0.7.0)#54

Open
its-mitesh-kumar wants to merge 5 commits into
redhat-developer:mainfrom
its-mitesh-kumar:feat/raise-pr-skill
Open

feat: add raise-pr and bug-fix skills with Jira integration (v0.7.0)#54
its-mitesh-kumar wants to merge 5 commits into
redhat-developer:mainfrom
its-mitesh-kumar:feat/raise-pr-skill

Conversation

@its-mitesh-kumar

@its-mitesh-kumar its-mitesh-kumar commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds raise-pr skill that automates the full PR workflow (detect workspace, build, generate changeset, commit, push, create PR) for both rhdh-plugins and community-plugins monorepos
  • Auto-detects which repo you're in via git remote -v and adapts PR template, npm scope, and upstream target accordingly
  • Supports --a auto-approve mode to skip all approval gates for unattended workflows
  • Built-in Jira integration — accepts a Jira key or URL, includes it in branch name and commit trailer, and performs post-PR Jira comment
  • Adds bug-fix skill for end-to-end bug fixing from Jira tickets with Playwright-based before/after screen recordings
  • Automated GIF embedding — uploads before/after GIFs to the feature branch via GitHub Contents API and embeds raw.githubusercontent.com URLs directly in the PR description
  • Screenshot + DOM diagnosis — captures screenshots, DOM snapshots, and computed styles during reproduction for deeper root-cause analysis
  • Auto-generated Test Plan — PR descriptions include a reviewer-facing verification checklist derived from Jira steps-to-reproduce
  • Reviewer disclaimer — bug-fix PRs include a note asking reviewers to verify thoroughly before merging
  • Bumps version to v0.7.0

Architecture

Bug Fix and Raise PR Skill

Context

Extracts and generalizes the existing Cursor command (rhdh-plugins/.cursor/commands/pr.md) and its #3679 enhancement into a portable agent skill that works across both plugin monorepos.

The raise-pr skill has first-class Jira support — any PR linked to a Jira issue gets automatic branch naming (fix/<workspace>-<JIRA-KEY>-<slug>), a Fixes: commit trailer, a ## Fixed section in the PR body, and a post-PR Jira comment via MCP.

The bug-fix skill chains into raise-pr after reproducing and fixing a bug: it writes a Playwright reproduction test with video recording, captures diagnostic context (screenshot + DOM + computed styles) to pinpoint the root cause, applies the fix, captures before/after recordings, converts them to GIFs, generates a test plan for reviewers, and creates the PR with embedded visual evidence.

How to Use

Prerequisites

Install

Install from local checkout (while PR is unmerged):

cd /path/to/rhdh-plugins
npx skills add /path/to/rhdh-skill --skill bug-fix
npx skills add /path/to/rhdh-skill --skill raise-pr

After merge:

npx skills add redhat-developer/rhdh-skill --skill bug-fix
npx skills add redhat-developer/rhdh-skill --skill raise-pr

Invoke

/bug-fix RHDHBUGS-1234
/bug-fix https://redhat.atlassian.net/browse/RHDHBUGS-1234

What it does

  1. Fetches the Jira issue (summary, description, steps to reproduce, component)
  2. Maps the Jira component to a workspace (e.g., "Lightspeed" → workspaces/lightspeed)
  3. Discovers e2e infrastructure (Playwright config, helpers, translations)
  4. Writes a temporary reproduction test with video recording enabled
  5. Runs the test — expects it to fail (bug reproduced), captures "before" video
  6. Captures diagnostic context — takes a screenshot, DOM snapshot, and computed styles of the target element for precise root-cause analysis
  7. Diagnoses root cause (cross-referencing captured DOM/styles with source code) and applies the fix
  8. Re-runs the test — expects it to pass (fix verified), captures "after" video
  9. Converts .webm recordings to GIFs via ffmpeg
  10. Generates a Test Plan — builds a markdown checklist from Jira steps-to-reproduce + fix verification + regression checks
  11. Deletes the reproduction test (not included in the PR)
  12. Chains into raise-pr — builds, generates changeset, commits, pushes, uploads GIFs to branch via GitHub Contents API, creates PR with before/after GIFs embedded + Test Plan + reviewer Note, then adds a comment on the Jira issue

Using raise-pr standalone with Jira

raise-pr RHDHBUGS-1234
raise-pr https://redhat.atlassian.net/browse/RHIDP-15252

When a Jira key is provided, raise-pr automatically:

  • Names the branch as fix/<workspace>-<JIRA-KEY>-<slug>
  • Adds a Fixes: trailer in the commit message
  • Includes a ## Fixed section in the PR body with the Jira link
  • After PR creation: adds a comment on the Jira issue via MCP

PR Body Sections (conditional)

The generated PR description includes these sections based on context:

Section Included when...
## Description Always
## Fixed jira_key is provided
## UI before changes / ## UI after changes recordings are provided (GIFs uploaded to branch)
## Test Plan test_plan is provided by caller
## Checklist Always
## Note Both recordings AND jira_key are present (automated bug-fix PR)

Key Design Decisions

  • GIF upload happens BEFORE gh pr create — GIFs are uploaded to the fork branch via GitHub Contents API, and the resulting raw.githubusercontent.com URLs are embedded directly in the PR body. No gh pr edit or manual drag-and-drop needed.
  • Simplified Jira integration — Only add_jira_comment MCP call (with correct body param) is used post-PR. Web Link and Transition steps were removed because the corresponding MCP tools don't exist and acli is a paid third-party tool.
  • Screenshot + DOM capture in diagnosis — The agent captures runtime state (screenshot, outerHTML, computed styles) before any fix is applied, providing concrete evidence for root-cause identification rather than guessing from source alone.
  • Auto-generated Test Plan — Derived from Jira steps-to-reproduce (inverted into verification steps) + expected behavior after fix + regression checks.
  • Reviewer disclaimer — Bug-fix PRs include a ## Note section reminding reviewers this was agent-generated and should be verified thoroughly.

Files

raise-pr skill

  • New: skills/raise-pr/SKILL.md — 11-step workflow with repo auto-detection, --a auto-approve mode, Jira context resolution, GIF upload via Contents API, and post-PR Jira comment
  • New: skills/raise-pr/references/repo-profiles.md — per-repo config (upstream remote, npm scope, PR body template with conditional Jira/recording/test-plan/note sections)
  • New: skills/raise-pr/references/jira-input.md — shared Jira key/URL parsing logic and REST API patterns

bug-fix skill

  • New: skills/bug-fix/SKILL.md — 8-step workflow (fetch Jira issue, identify workspace, reproduce with video, diagnose with screenshot+DOM capture, fix, verify, convert videos, generate test plan, chain into raise-pr)
  • New: skills/bug-fix/references/workspace-map.md — Jira component to rhdh-plugins workspace directory mapping with runtime discovery instructions
  • New: skills/bug-fix/references/e2e-patterns.md — shared Playwright patterns across all workspaces (multi-locale, dual-mode, translation helpers, MUI patterns, repro test template)
  • New: skills/bug-fix/references/video-recording.md — Playwright video config, ffmpeg conversion, and automated GitHub Contents API embedding workflow

Metadata

  • Modified: README.md — added Bug Fix section, updated raise-pr description with Jira integration mention
  • Modified: pyproject.toml, .claude-plugin/plugin.json, .claude-plugin/marketplace.json — version bump to 0.7.0

Test plan

  • uv run pytest passes (321 passed, 1 pre-existing failure unrelated to this PR)
  • Skill structure tests pass (test_skill_structure.py)
  • Marketplace/version tests pass (test_marketplace.py)
  • Install via npx skills add redhat-developer/rhdh-skill --skill raise-pr and verify Jira input parsing
  • Install via npx skills add redhat-developer/rhdh-skill --skill bug-fix and verify trigger phrases
  • Test raise-pr with a Jira key: verify branch name, commit trailer, PR body, and post-PR Jira comment
  • Test bug-fix with an RHDHBUGS issue: verify full workflow including screenshot capture, test plan generation, GIF upload, and PR creation with embedded images

Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
@its-mitesh-kumar its-mitesh-kumar changed the title feat: add raise-pr skill for automated PR workflows (v0.7.0) feat: add raise-pr and bug-fix skills with Jira integration (v0.7.0) Jul 3, 2026
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
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.

1 participant