plugins/openshift-developer/skills/create-pr/SKILL.md
Create a pull request from the current branch for a Jira issue. Use when changes are committed and pushed and the user wants to open a PR linking back to a Jira issue.
npx skillsauth add openshift-eng/ai-helpers create-prInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
openshift-developer:create-pr
/openshift-developer:create-pr <ISSUE_KEY> [--upstream <owner/repo>] [--head <fork-owner>:<branch>]
Creates a pull request from the current feature branch, linking it to a Jira issue. Reads the repo's PR template, inspects the commit log, and generates a well-structured PR title and body. Designed as the final step of the solve pipeline, after /jira:solve, code-review:pre-commit-review and address-review-precommit.
Parse arguments:
$1 — Jira issue key (required, e.g. OCPBUGS-1234)--upstream — target repository (default: infer from gh repo view --json nameWithOwner)--head — PR head ref in fork-owner:branch format (default: current branch)Determine the current branch:
BRANCH=$(git branch --show-current)
Discover remotes, then determine the base branch:
REMOTE=$(git remote | head -1)
BASE_BRANCH=$(git remote show "$REMOTE" | sed -n 's/.*HEAD branch: //p')
Fall back to main if detection fails.
Read the commit history for the PR:
git log "${BASE_BRANCH}..HEAD" --format="%h %s%n%n%b" --reverse
Read the PR template if it exists:
cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null || true
Title: Must start with <ISSUE_KEY>: followed by a concise summary derived from the commits.
Body: Structure using the PR template if one exists. Include:
https://redhat.atlassian.net/browse/<ISSUE_KEY>Always review AI generated responses prior to use.
Generated with [Claude Code](https://claude.com/claude-code) via openshift-developer plugin
Build and run the gh pr create command:
gh pr create \
--repo <UPSTREAM> \
--head <HEAD_REF> \
--no-maintainer-edit \
--title '<ISSUE_KEY>: <summary>' \
--body '<body>'
--upstream was provided, use it as --repo.--head was provided, use it directly.--repo and --head (defaults to current repo context and current branch).Print the PR URL returned by gh pr create.
Create a PR for a Jira issue (simple):
/openshift-developer:create-pr CNTRLPLANE-1234
Create a PR targeting a specific upstream from a fork:
/openshift-developer:create-pr OCPBUGS-5678 --upstream openshift/hypershift --head hypershift-community:fix/OCPBUGS-5678
$1 — Jira issue key (required)--upstream — target repository in owner/repo format (optional)--head — PR head ref in fork-owner:branch format (optional)git remote or git branch -vv) before selecting onetools
Analyze a JIRA issue and create a pull request to solve it. Use when the user wants to implement a fix or feature described in a Jira issue, push a branch, and open a draft PR.
development
Use when a deeper level of code review is requested. Multi-agent panel code review with specialist reviewers and forced runtime reproducers for all BLOCKING bug findings. Optionally posts to GitHub/GitLab as a PENDING review.
development
Review agentic documentation — verify claims locally against source code first, then use chai-bot for cross-repo and cross-functional verification
development
Use this skill when debugging a failed Prow CI job.