GitHub Pull Request
Prepare a concise, reviewer-focused pull request from the finalized branch changes. Use the project template and submit the pull request only after the user approves the description.
Workflow
- Detect the base branch from the remote:
BASE=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name') - Compare the current branch with the base branch. Describe the final result, not superseded work from earlier commits.
- Generate
.scratchpad/PR.mdwith a concise summary, explicit design decisions, and implementation-note subheadings that describe each decision group's shared goal or motif. - Pause here and prompt the user to check the
.scratchpad/PR.mdbefore proceeding. - Once edited and approved by the user, fill in the missing details in the following script and then run it:
HEAD=$(git rev-parse --abbrev-ref HEAD) gh pr create --base "$BASE" --head "$HEAD" --title 'category(scope): concise title' --body-file .scratchpad/PR.md - Delete
.scratchpad/PR.mdonce successfully submitted.
Pull Request Title Guidelines
- Examine the commit messages that make up the pull request for inspiration
- Keep it short and sweet, encapsulating a summary of the implemented feature concisely in imperative form
- Use
categoryspecifiers likefeat,fix,docs,chore,deps, etc. (consistent with the Conventional Commits message style) - Determine the
scopeof the changes based on the most affected part of the codebase - Refer to the GitHub issues provided by the user (if applicable)
- Mention these issues in natural-flowing prose (with respect to the pull request description)
- Use keywords like
closes,fixes, andresolves