create-pr
БесплатноБез исполняемых скриптовНе проверенPush a completed clean feature branch and create a pull request for a Jira issue. Use when implementation and required quality gates have succeeded and the…
от openshift-eng★ 123 звезды на GitHubОб этом скилле
Name
openshift-developer:create-pr
Synopsis
/openshift-developer:create-pr <ISSUE_KEY> [--upstream <owner/repo>] [--head <fork-owner>:<branch>]
Description
Creates a pull request from a completed feature branch and links it to a Jira issue. Reads the repo's PR template, inspects the commit log, and generates a well-structured PR title and body. It is the delivery building block selected by jira-solve after the chosen implementation and quality chain succeeds.
Implementation
Step 1: Gather context
Parse arguments:
$1— Jira issue key (required, e.g.OCPBUGS-1234)--upstream— target repository (default: infer fromgh repo view --json nameWithOwner)--head— PR head ref infork-owner:branchformat (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
mainif detection fails.Read the commit history for the PR:
git log "${BASE_BRANCH}..HEAD" --format="%h %s%n%n%b" --reverseRead the PR template if it exists:
cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null || true
Step 2: Compose the PR
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:
- A description of the changes based on the commit log
- A link to the Jira issue:
https://redhat.atlassian.net/browse/<ISSUE_KEY> - The following footer at the very end:
Always review AI generated responses prior to use. AI-assisted response via openshift-developer plugin
Step 3: Create the PR
Before pushing, require git status --short to be empty. Refuse to push the default
branch or to force-push. Push the current feature branch to the selected remote, unless
the caller prohibits external writes. Do not create a PR when the branch was not pushed.
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>'
- If
--upstreamwas provided, use it as--repo. - If
--headwas provided, use it directly. - If neither was provided, omit
--repoand--head(defaults to current repo context and current branch).
Step 4: Report
Print the PR URL returned by gh pr create.
Return Value
- PR URL: the URL of the newly created pull request
Examples
Create a PR for a Jira issue (simple):
/openshift-developer:create-pr CNTRLPLANE-1234Create a PR targeting a specific upstream from a fork:
/openshift-developer:create-pr OCPBUGS-5678 --upstream openshift/hypershift --head hypershift-community:fix/OCPBUGS-5678
Arguments
$1— Jira issue key (required)--upstream— target repository inowner/repoformat (optional)--head— PR head ref infork-owner:branchformat (optional)
Guidelines
- Discover remotes first (e.g.
git remoteorgit branch -vv) before selecting one - Always include the Jira issue key prefix in the PR title
- Always include the AI-generated footer at the end of the PR body
- Use the repo's PR template when available
- Derive the PR description from the actual commit log, not from assumptions
Установить create-pr в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл create-pr?
Push a completed clean feature branch and create a pull request for a Jira issue. Use when implementation and required quality gates have succeeded and the branch is ready for delivery.
Как установить скилл create-pr?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл create-pr запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic