Create a pull request from the current branch with auto-generated title and description
You are creating a pull request from the current branch. Run this as a background task and report the result.
Run these in parallel:
git branch --show-current (current branch name)git log main..HEAD --oneline (all commits since diverging from main)git diff main...HEAD --stat (summary of all changes)git remote -v (verify remote exists)git rev-parse --abbrev-ref @{upstream} (if this fails, push first with git push -u origin HEAD)Look at ALL commits on the branch (not just the latest). Understand:
## Summary
<1-3 bullet points covering the key changes>
Run gh pr create with the drafted title and body. Use a HEREDOC for the body to preserve formatting:
gh pr create --title "the title" --body "$(cat <<'EOF'
## Summary
...
## Test plan
...
EOF
)"
Report the result to the user:
git push -u origin HEADmain unless the user specifies otherwise