Create Pull Request
- Gather context:
git branch --show-current
git log main..HEAD --oneline --no-merges 2>/dev/null || git log master..HEAD --oneline --no-merges
git diff main..HEAD --stat 2>/dev/null || git diff master..HEAD --stat
- Generate PR title and body from the commits and diff.
Title format: type: short description (Conventional Commits style, max 72 chars)
Body template:
## Summary
-
## Changes
-
## Testing
- [ ] Tests added/updated
- [ ] Manually tested
## Related Issues
Closes #
- Show the draft to the user and ask for confirmation or edits.
- On confirmation:
gh pr create --title "..." --body "..." --base "${1:-main}"
Base branch defaults to main (or $1 if provided).