Create Pull Request
Accept an optional base branch argument (default: main).
Workflow
- Verify clean working tree and current branch via
git status- If working tree is dirty, stop and inform the user
- Analyze commits since base branch via
git logandgit diff <base>...HEAD - Push branch if needed:
git push -u origin HEAD - Create PR:
gh pr create --title "<type>: <concise title>" --body "$(cat <<'EOF'
## Summary
- <1-3 bullets focusing on WHY, not what>
## Test plan
- [ ] <verification steps>
EOF
)"
- Return the PR URL
Rules
- Never use interactive flags (
-i) - Never use
--forceor--force-with-leasewhen pushing