Skip to content

Pull Request Naming Guide

Yihui Liao edited this page Sep 30, 2024 · 1 revision

Since we squash & merge our pull requests, the name of the PR becomes the commit on main which we also use to help generate our changelog. In order to improve our changelog and the process of release notes, we aim to make our PR names more readable by implementing certain rules on how our PR’s must be named.

The format of a PR name consists of the following: Type (Scope): Summary of changes

Type:

In each PR, you must specify what type of change was made and include one of the following:

Prefix Meaning
fix Fixing a bug
feat Adding a new feature
build Updates that affect the build system/process
chore Miscellaneous commits that do not affect the meaning of the code (e.g. white space, formatting, missing semi-colons, typos within the code, comment adjustments, etc.)
docs A change to the documentation only
test Adding or fixing existing tests
refactor A code change that neither fixes a bug or adds a feature
ci Changes to the CI config
localize Changes related to translations and localization
bump Increase the version of some dependency
revert Undoing a previous commit

Scope:

This is optional and does not need to be included in the PR name. However, if you choose to include it, it should be a noun that gives context to the part of the codebase that is affected by the commit. Please do not use issue identifiers as scope.

Examples of scope:

feat(RAC)
fix(virtualization)

Summary of Changes:

It should provide a concise summary of what changes were made and should be readable at a glance.

Examples of accepted PR titles:

fix: allow useHref on synthetic links
docs: fix typo in usePress docs
feat(virtualization): add support for custom collection renderers

Note:

The contents of this guide are subject to change as we rollout this new change to our repo. We appreciate any feedback or suggestions!