Loading...
Loading...
Use when opening a pull request, submitting code for review, or when the user says "create PR," "open PR," or "/gh-pr-create." Generates conventional-commit title and structured body from branch commits.
npx skill4agent add sadiksaifi/agents gh-pr-createBASE=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')
HEAD=$(git branch --show-current)
COMMITS=$(git log "$BASE".."$HEAD" --oneline)$HEAD$BASE$COMMITSgh pr view --json url 2>&1git status --porcelaingit push -u origin "$HEAD"git log "$BASE".."$HEAD" --pretty=format:'%h %s' --reverse
git diff --stat "$BASE".."$HEAD"gh repo view --json pullRequestTemplatestype(scope): subjectfeatfixdocsrefactortestchoreciperfCloses #XFixes #XResolves #X═══ PR PREVIEW ═══════════════════════
Title: type(scope): subject
Base: main ← Head: feature-branch
Body:
──────────────────────────────────────
[full body content]
──────────────────────────────────────
Closes: #123, #456 (or "None")
══════════════════════════════════════gh pr create --base "$BASE" --title "$TITLE" --body "$BODY"