Overview

A pull request is the handoff from a branch to main. This page owns the PR mechanics: the title format, merge strategy, draft norms, review routing, and auto-merge. Branching is in github and the rules enforced on main are in github-branch-protection.

Title the PR in Conventional Commits format

With squash merge, the PR title becomes the commit subject on main, so it follows Conventional Commits.

feat(tooling): add GitHub CLI cheatsheet
fix(ops): correct CNAME plugin path for custom domain
chore(deps): bump actions/checkout to v7
docs(coding): add Python typing page

Use feat for new behavior, fix for bug corrections, refactor for structure with no behavior change, test, docs, ci, and chore for the rest. The scope names the area. Keep the subject under 72 characters. Commit message rules are in git.

Squash merge by default

Allow squash merging only, so main has one commit per PR and a revert is one command. Use a merge commit only when a long-running branch’s individual commits carry meaning worth keeping. Disable rebase merging so contributors do not guess which strategy a button applies. Turn on the linear-history rule only after merge commits are disabled; see github-branch-protection.

Open as a draft, promote when CI is green

Open a draft on the first push to signal work in progress. Promote it when checks pass and the description is complete. The description has two parts: what changed and why, and a test plan the reviewer can follow. “Manually tested” is not a test plan; “Opened /tooling/github-actions and confirmed every link resolves” is. Put Closes #123 in the body so the merge closes the issue; skip the link when no issue exists.

Route review with CODEOWNERS

.github/CODEOWNERS (also allowed at the repository root or docs/) maps paths to owners. GitHub requests review from the matching owners when a PR touches their paths, but not on a draft until it is marked ready. The last matching pattern wins, so put the default first.

*              @org/core-team
/content/ops/  @org/ops-team
/.github/      @org/devops-team

Owners become mandatory reviewers only when the branch rule “Require review from Code Owners” is on. Keep the file short; a different team per directory slows merges without improving review.

Use auto-merge for approved work waiting on CI

gh pr merge --auto --squash

Auto-merge needs the repository setting “Allow auto-merge,” and the option appears only on PRs that cannot merge yet because required reviews or status checks are pending. GitHub disables a pending auto-merge if someone without write access pushes to the head branch. Without required checks there is nothing to wait for, so protect the branch first.

Review the code, then approve or request changes

Approve when you have read the diff and believe it is correct and maintainable. Comment on lines you question. Request changes for a bug, a missing test, or a design problem. Do not approve with comments that imply the code still needs changes; that leaves the author in an ambiguous state. “LGTM, the cache key hash is correct, one nit on line 42” is a review; “ship it” with no read is noise.