pr
Create or update a pull request with an auto-filled template.
Alias: devflow p

Flow
- Checks if a PR already exists for the current branch:
- Open PR — offers to update it
- Merged PR — asks whether to create a new PR
- Closed PR — asks whether to reopen and update, or create a new PR
- Infers the base branch (closest remote branch by merge-base)
- Enter PR title (pre-filled from branch description)
- Enter optional summary
- Preview PR body with template
- Confirm and create/update/reopen
Features
- Auto-detects existing PRs; handles open, merged, and closed states
- Infers base branch using
git merge-basecomparison - Pre-fills commit list in the summary
- Auto-labels from branch type (
feat→feature,fix→bug, etc.) - Auto-labels from commit scopes
- Self-assigns with
@me - Creates as draft by default
- Links ticket if
ticketBaseUrlis configured - Auto-close syntax with GitHub Issues provider (
Closes #123)
PR Template Sections
- Summary (with commit list)
- Ticket (linked if base URL configured)
- Type of Change (checkboxes, auto-checked from branch type)
- Screenshots table
- Test Plan
- Checklist (customizable via config)
GitHub Issues Auto-Close
When ticketProvider: { type: "github" } is configured and the ticket is a GitHub issue number, the PR body uses Closes #N syntax instead of a link:
markdown
## Ticket
Closes #142This automatically closes the issue when the PR is merged.
Options
| Option | Description |
|---|---|
--title <title> | PR title (skips title prompt) |
--summary <summary> | PR summary text (skips summary prompt) |
--base <branch> | Base branch to merge into (skips base prompt) |
--ready | Create as ready for review instead of draft |
--yes | Skip all confirmation prompts; auto-creates new PR if existing one is merged/closed |
--dry-run | Preview the PR body without creating |