2.5 KiB
Maintainer Best Practices
PR Types
- Feature-work PR: A PR that implements an RFC, which usually involves relatively large set of changes.
- Regular PR: A bug fix or an enhancement change that are not backed by an RFC.
Review PRs
- Ask the author to reword the PR title based on guidelines in Contributing.
- Ask the author to apply
[Feature]
tag to trigger full test builds if it's necessary. - Label the PR with
Breaking-Change
,Documentation Needed
andArea-XXX
as appropriate. - When labelling a PR with
Review-Committee
, leave a detailed comment to summarize the issue you want the committee to look into. It's recommended to include examples to explain/demonstrate behaviors.
Merge PRs
-
Use
Squash and merge
by default to keep clean commit history in Master branch. -
Use
Create a merge commit
for feature-work PRs only if the commit history of the PR is reasonably clean. After using this option, GitHub will make it your default option for merging a PR. Do remember to change the default back toSquash and merge
. -
Avoid
Rebase and merge
unless you have a strong argument for using it. -
Before clicking
Confirm squash and merge
orConfirm merge
, make sure you run through the following steps:-
The commit title should be a short summary of the PR.
-
When merging with the
Squash and merge
option, the PR title will be used as the commit title by default. Reword the title as needed to make sure it makes sense (can be used without change inCHANGELOG.md
). -
When merging with the
Create a merge commit
option, the default commit title would beMerge pull request XXX from YYY
. Replace it with a short summary of the PR, and add the PR number to the end, like(#1234)
.
-
-
The optional extended description is required for feature-work PRs, or regular PRs with breaking changes. For other PRs, it's not required but good to have based on the judgement of the maintainer.
- If a PR introduces breaking changes,
make sure you put the tag
[breaking change]
at the first line of the extended description, and start the description text from the second line.
- If a PR introduces breaking changes,
make sure you put the tag
-
Use the present tense and imperative mood for both the commit title and description.
-