PR Generation Workflow
- •Identify base branch (usually
main) - •Run
git log main...HEAD --onelineto see commits - •Run
git diff main...HEAD --statfor file overview - •Draft title and description
Title Format
code
type: short summary of change
Examples: feat: add user authentication, fix: resolve race condition in queue
Description Template
markdown
## Summary - What changed (bullet points, user-facing impact first) - Why it was needed ## Test Plan - [ ] Unit tests pass - [ ] Manual test: [specific scenario] - [ ] Edge case: [describe] ## Notes - Breaking changes (if any) - Screenshots (for UI changes) - Dependencies on other PRs
Branch Hygiene
- •Feature branches should be cut from latest
main - •Never push directly to
main— always use feature branches - •Ensure
git pull origin mainbefore branching - •Squash or organize commits before merging if history is messy
Using gh CLI
bash
gh pr create --title "feat: ..." --body "$(cat <<'EOF' ## Summary ... EOF )"