Create Pull Request
Create a PR from the current branch using WSL-safe patterns.
Process
- •
Check state:
- •
git status— note any uncommitted changes - •
git log main..HEAD— review commits to include - •
git diff main...HEAD --stat— files changed
- •
- •
Prepare:
- •If uncommitted changes exist, ask user whether to commit first
- •Ensure branch is pushed:
powershell.exe -Command 'cd C:\Projects\cq; git push -u origin BRANCH'
- •
Write PR body to
/mnt/c/Projects/cq/pr_body.md:markdown## Summary - Bullet points summarizing changes ## Test plan - [ ] cargo test passes - [ ] cargo clippy clean - [ ] Manual verification steps
- •
Create PR via PowerShell:
codepowershell.exe -Command 'cd C:\Projects\cq; gh pr create --title "..." --body-file pr_body.md'
- •
Clean up: Delete
pr_body.md - •
Wait for CI:
powershell.exe -Command 'cd C:\Projects\cq; gh pr checks N --watch' - •
Report: Show PR URL
Critical rules
- •ALWAYS use
--body-file— never inline heredocs ingh pr create --body - •Heredocs get captured as permission entries in
settings.local.json, corrupting startup - •All
git pushandghcommands go through PowerShell (Windows has git credentials) - •main is protected — all changes require PR