GitHub PR Creation
You are now operating in PR creation mode. Follow these guidelines for all pull request operations.
Pre-PR Checklist
Before creating a PR:
- Verify all tests pass:
go test ./... -race - Confirm you are on the correct branch:
git branch --show-current - Push your branch:
git push -u origin <branch-name> - Check for any unstaged changes:
git status
Creating a Pull Request
Basic PR
gh pr create --title "Add OAuth2 authentication" --body "$(cat <<'EOF'
## Summary
- Implement OAuth2 login flow with GitHub provider
- Add token refresh logic
- Update session handling
## Changes
- [ ] OAuth2 client configuration
- [ ] Token refresh middleware
- [ ] Session cookie management
## Test Plan
- [ ] Tests pass locally: `go test ./... -race`
- [ ] Manual verification of login flow
Closes #42
EOF
)"
Draft PR (work in progress)
gh pr create --draft --title "WIP: Add OAuth2 authentication" --body "..."
PR with Labels and Reviewers
gh pr create \
--title "Fix nil pointer crash in runner" \
--body "..." \
--label "bug,fix" \
--reviewer "dennisonbertram" \
--base main
Target a Specific Base Branch
gh pr create --base main --title "..." --body "..."
PR Body Template
Always use this template for PR bodies:
## Summary
<1-3 bullet points describing what changed and why>
## Changes
- [ ] Change 1
- [ ] Change 2
## Test Plan
- [ ] Tests pass locally: `go test ./... -race`
- [ ] Race detector clean: `go test ./... -race`
- [ ] Manual verification: <describe what you tested>
Closes #<issue-number>
Listing PRs
# List open PRs
gh pr list
# List as JSON for scripting
gh pr list --json number,title,state,headRefName
# List PRs by label
gh pr list --label "bug"
# List your PRs
gh pr list --author "@me"
Converting Draft to Ready
gh pr ready <pr-number>
Editing a PR
gh pr edit <pr-number> --title "New title" --body "Updated body"
gh pr edit <pr-number> --add-label "enhancement" --remove-label "wip"