Skip to content

CNTRLPLANE-3677: openshift-developer: add create-pr skill - #569

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift-eng:mainfrom
enxebre:add-create-pr-skill
Jun 24, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openshift-eng:mainfrom
enxebre:add-create-pr-skill

Conversation

@enxebre

@enxebre enxebre commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add create-pr skill to the openshift-developer plugin — creates a PR from the current branch for a Jira issue, completing the pre-PR author loop after jira:solve, code-review:pre-commit-review, and address-review-precommit.
  • Bump plugin version to 1.1.3.
  • This skill replaces the hardcoded PR creation prompts in the jira-agent Prow job, allowing the process script to invoke /openshift-developer:create-pr instead of constructing custom prompts inline.

Test plan

  • Install the plugin and verify /openshift-developer:create-pr is listed as an available skill
  • Test invocation: /openshift-developer:create-pr <ISSUE_KEY> --upstream <repo> --head <fork>:<branch>

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a new OpenShift Developer skill guide for creating a Jira-linked GitHub pull request from the current branch, including argument options, automatic base-branch inference, PR title/body generation from commit history, and PR creation via gh.
  • Chores
    • Bumped the OpenShift Developer plugin version to the latest patch release.
    • Reformatted marketplace keywords for related plugins (no behavior change).

@openshift-ci
openshift-ci Bot requested review from bryan-cox and stbenjam June 24, 2026 10:55
@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 24, 2026
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

A new create-pr skill is added for the openshift-developer plugin, and the plugin version is bumped to 1.1.3 across the manifest and published metadata. The docs index is updated to list the new skill, and marketplace keyword arrays are reformatted.

Changes

OpenShift Developer skill and metadata

Layer / File(s) Summary
Create-pr skill guide
plugins/openshift-developer/skills/create-pr/SKILL.md
Adds the create-pr skill with its command usage, PR construction flow, PR body requirements, gh pr create invocation, return value, examples, and execution guidelines.
Plugin metadata refresh
plugins/openshift-developer/.claude-plugin/plugin.json, .claude-plugin/marketplace.json, docs/index.html
Bumps the openshift-developer version to 1.1.3 in the manifest, marketplace index, and docs index; adds the create-pr skill entry to the docs index; and reformats two marketplace keyword arrays.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • cblecker
  • stbenjam
🚥 Pre-merge checks | ✅ 10
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding the new create-pr skill to openshift-developer.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Real People Names In Style References ✅ Passed The added skill and docs use product/repo names only; no real person's name appears as a style reference or example.
No Assumed Git Remote Names ✅ Passed The new create-pr skill discovers remotes before use and adds no hardcoded origin/upstream git remote assumptions.
Git Push Safety Rules ✅ Passed PASS: The new create-pr skill only runs gh pr create; it has no git push/force-push instructions and only says to use it after changes are already pushed.
No Untrusted Mcp Servers ✅ Passed Changed files add a PR-creation skill and metadata/version bumps only; no MCP server installs or new MCP dependencies were introduced.
Ai-Helpers Overlap Detection ✅ Passed No ≥60% overlap found; the new create-pr skill is unique, and the closest files (jira:solve, revert-pr, coderabbit...open-pr) target different workflows.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 markdownlint-cli2 (0.22.1)
plugins/openshift-developer/skills/create-pr/SKILL.md

markdownlint-cli2 v0.22.1 (markdownlint v0.40.0)
Error: Unable to use configuration file '/coderabbit-0.markdownlint-cli2.jsonc'; ENOENT: no such file or directory, open '/coderabbit-0.markdownlint-cli2.jsonc'
at throwForConfigurationFile (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:48:9)
at readOptionsOrConfig (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:169:5)
at async main (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:927:21)
at async file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2-bin.mjs:14:22 {
[cause]: Error: ENOENT: no such file or directory, open '/coderabbit-0.markdownlint-cli2.jsonc'
at async open (node:internal/fs/promises:640:25)
at async Object.readFile (node:internal/fs/promises:1287:14)
at async readOptionsOrConfig (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:141:17)
at async main (file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2.mjs:927:21)
at async file:///usr/local/lib/node_modules/markdownlint-cli2/markdownlint-cli2-bin.mjs:14:22 {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/coderabbit-0.markdownlint-cli2.jsonc'
}
}


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

@enxebre
enxebre force-pushed the add-create-pr-skill branch from 836aa57 to bb72e98 Compare June 24, 2026 10:58

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/openshift-developer/.claude-plugin/plugin.json`:
- Line 4: The manifest version in the plugin metadata does not match the PR’s
stated target version. Update the version field in the plugin manifest to the
intended release value, or adjust the PR objective if the lower version is
correct, so the change is consistent with the release plan.

In `@plugins/openshift-developer/skills/create-pr/SKILL.md`:
- Around line 10-12: The fenced code blocks in the skill documentation are
missing language identifiers, which violates the markdown lint rules. Update the
affected fenced blocks in the create-pr SKILL.md content to use the appropriate
identifiers, such as text for generic command examples and bash where the block
is shell syntax. Make the same fix for all referenced blocks so the markdown
stays consistent and lint-compliant.
- Around line 31-35: The create-pr skill still hardcodes the remote name and
conflicts with the remote-discovery guidance. Update the base-branch detection
in create-pr workflow/docs to discover the remote first (for example via git
remote -v or another approved discovery command) and use that value in git
remote show instead of assuming origin. Also revise the surrounding wording in
SKILL.md so the defaults and “do not run” guidance no longer prohibit remote
discovery and instead describe selecting a remote after discovery, keeping the
create-pr instructions aligned with repo policy.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3ffb30df-55b7-4aca-bc0d-cc82a691e19c

📥 Commits

Reviewing files that changed from the base of the PR and between a365cb3 and bb72e98.

📒 Files selected for processing (2)
  • plugins/openshift-developer/.claude-plugin/plugin.json
  • plugins/openshift-developer/skills/create-pr/SKILL.md

"name": "openshift-developer",
"description": "Bundle of curated plugins, skills, and MCP servers useful to any OpenShift engineer",
"version": "1.1.2",
"version": "1.1.3",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Version bump does not match stated PR objective.

The PR objective says the manifest should be bumped to 1.2.0, but this file sets 1.1.3. Please align either the objective or the manifest version before merge.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/openshift-developer/.claude-plugin/plugin.json` at line 4, The
manifest version in the plugin metadata does not match the PR’s stated target
version. Update the version field in the plugin manifest to the intended release
value, or adjust the PR objective if the lower version is correct, so the change
is consistent with the release plan.

Comment thread plugins/openshift-developer/skills/create-pr/SKILL.md Outdated
Comment thread plugins/openshift-developer/skills/create-pr/SKILL.md Outdated
Add create-pr skill to create a PR from the current branch for a Jira
issue, completing the pre-PR author loop. Bump version to 1.1.3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@enxebre
enxebre force-pushed the add-create-pr-skill branch from bb72e98 to 753a489 Compare June 24, 2026 13:49

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@plugins/openshift-developer/skills/create-pr/SKILL.md`:
- Around line 31-35: The remote/base-branch discovery in the PR creation flow is
order-dependent because it uses the first remote, so update the logic in the
create-pr skill to derive the remote from the current branch’s tracking
information first. Adjust the sequence around the remote detection and
BASE_BRANCH setup to use git branch -vv (or equivalent tracking metadata) to
find the branch’s remote, and only fall back to a discovered remote when
tracking info is unavailable; keep the existing BASE_BRANCH resolution flow
intact.
- Line 36: The fallback behavior is documented but not actually implemented: the
create-pr flow should explicitly set the target branch to main when branch
detection fails. Update the command sequence in SKILL.md around the create-pr
instructions so the fallback path in the relevant branch-detection logic uses
main as the default, and make sure the documented behavior matches the actual
steps shown to users.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 857f554f-ca33-43e6-aa51-e65e76da9c4b

📥 Commits

Reviewing files that changed from the base of the PR and between bb72e98 and 753a489.

📒 Files selected for processing (4)
  • .claude-plugin/marketplace.json
  • docs/index.html
  • plugins/openshift-developer/.claude-plugin/plugin.json
  • plugins/openshift-developer/skills/create-pr/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • plugins/openshift-developer/.claude-plugin/plugin.json

Comment on lines +31 to +35
3. Discover remotes, then determine the base branch:
```bash
REMOTE=$(git remote | head -1)
BASE_BRANCH=$(git remote show "$REMOTE" | sed -n 's/.*HEAD branch: //p')
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Use deterministic remote discovery tied to the current branch

Line 33 picks the first remote, which is order-dependent and can select the wrong base for the PR diff. Prefer discovering from the current branch tracking info (git branch -vv) and only then falling back.

As per coding guidelines, “Code should NEVER assume git remote names like 'origin' or 'upstream' without first discovering them - use git remote -v or git branch -vv to discover remotes first”.

Suggested update
-REMOTE=$(git remote | head -1)
-BASE_BRANCH=$(git remote show "$REMOTE" | sed -n 's/.*HEAD branch: //p')
+REMOTE=$(git branch -vv | awk '/^\*/ {print $0}' | sed -n 's/.*\[\([^\/]*\)\/.*/\1/p')
+[ -z "$REMOTE" ] && REMOTE=$(git remote -v | awk 'NR==1{print $1}')
+BASE_BRANCH=$(git remote show "$REMOTE" | sed -n 's/.*HEAD branch: //p')

Also applies to: 104-104

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/openshift-developer/skills/create-pr/SKILL.md` around lines 31 - 35,
The remote/base-branch discovery in the PR creation flow is order-dependent
because it uses the first remote, so update the logic in the create-pr skill to
derive the remote from the current branch’s tracking information first. Adjust
the sequence around the remote detection and BASE_BRANCH setup to use git branch
-vv (or equivalent tracking metadata) to find the branch’s remote, and only fall
back to a discovered remote when tracking info is unavailable; keep the existing
BASE_BRANCH resolution flow intact.

Source: Coding guidelines

REMOTE=$(git remote | head -1)
BASE_BRANCH=$(git remote show "$REMOTE" | sed -n 's/.*HEAD branch: //p')
```
Fall back to `main` if detection fails.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Implement the documented main fallback explicitly

Line 36 says fallback to main, but the command sequence does not actually set it when detection fails.

Suggested update
 BASE_BRANCH=$(git remote show "$REMOTE" | sed -n 's/.*HEAD branch: //p')
+[ -z "$BASE_BRANCH" ] && BASE_BRANCH=main
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@plugins/openshift-developer/skills/create-pr/SKILL.md` at line 36, The
fallback behavior is documented but not actually implemented: the create-pr flow
should explicitly set the target branch to main when branch detection fails.
Update the command sequence in SKILL.md around the create-pr instructions so the
fallback path in the relevant branch-detection logic uses main as the default,
and make sure the documented behavior matches the actual steps shown to users.

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2026
@openshift-ci

openshift-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox, enxebre

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

The pull request process is described 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-merge-bot
openshift-merge-bot Bot merged commit 9961efa into openshift-eng:main Jun 24, 2026
6 checks passed
@enxebre enxebre changed the title openshift-developer: add create-pr skill CNTRLPLANE-3677: openshift-developer: add create-pr skill Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants