Skip to content

pr

Create or update a pull request with an auto-filled template.

Alias: devflow p

devflow pr demo

Flow

  1. 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
  2. Infers the base branch (closest remote branch by merge-base)
  3. Enter PR title (pre-filled from branch description)
  4. Enter optional summary
  5. Preview PR body with template
  6. Confirm and create/update/reopen

Features

  • Auto-detects existing PRs; handles open, merged, and closed states
  • Infers base branch using git merge-base comparison
  • Pre-fills commit list in the summary
  • Auto-labels from branch type (featfeature, fixbug, etc.)
  • Auto-labels from commit scopes
  • Self-assigns with @me
  • Creates as draft by default
  • Links ticket if ticketBaseUrl is 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 #142

This automatically closes the issue when the PR is merged.

Options

OptionDescription
--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)
--readyCreate as ready for review instead of draft
--yesSkip all confirmation prompts; auto-creates new PR if existing one is merged/closed
--dry-runPreview the PR body without creating

Released under the MIT License.