PR Describe¶
Draft a pull-request title and body. Do not open the PR — hand the text to the user.
Steps¶
- Detect the base branch: check
git remote show origin | grep 'HEAD branch', fall back tomain. git log <base>..HEAD --no-merges --reverse --format='%h %s%n%b'— read every commit, not just the latest.git diff <base>...HEAD --statfor scope, then targetedgit diff <base>...HEAD -- <path>for files that look important.- If a PR template exists at
github_internal/pull_request_template.mdorgithub_internal/PULL_REQUEST_TEMPLATE.md, follow its structure.
Title¶
- ≤ 70 characters, imperative mood, no trailing period.
- Prefix with a Conventional Commits type only if the repo's existing PR titles do.
Body¶
Default structure (unless a template overrides):
```markdown
Summary¶
<2-4 bullets: what changed and why — not a commit list>
Changes¶
Test plan¶
Notes¶
Rules¶
- Focus on why, not what. The diff already shows what.
- Never invent issue numbers or Jira tickets. Only include
Closes #Nif a commit message references it. - If the branch is empty relative to base, stop and tell the user.
- Do not run
gh pr createor push. Output the title and body as a single markdown block the user can paste.
Output¶
Exactly two fenced blocks: title and body. Nothing else.