Skip to content

Pull Request Naming Guide

roux g. buciu edited this page Dec 21, 2021 · 18 revisions

Naming the PR

The name of a PR is important, because it will eventually become the commit that shows up in main. Here are the guidelines for how to name a PR.

Anatomy of a PR name:

Keyword #issue-number [version-number] Short summary

Keyword

The keyword should be the first thing in the name, to let everyone know what kind of change the PR is. Here is a table of the standard keywords, and what they mean:

Key Word Meaning
Add Create a capability e.g. feature, test, dependency.
Remove Remove a capability e.g. feature, test, dependency.
Refactor An update to existing code and/or refactoring.
Bugfix Fix an issue e.g. bug, typo, accident, misstatement.
Bump Increase the version of something e.g. dependency.
Build Change only to the build process, tooling, or infra.
Document A change to documentation only.
Localize String and localization only related changes.

Discussion: Why the standard GitHib Fixes/Fix keyword is not used? Simply put, these two keywords close tickets. However, we want to prevent tickets from being closed - rather, those tickets should follow our process and be moved to QA. As such, we use Bugfix instead.

Issue Number

Following the keyword is the issue number - this is the GitHub issue the ticket addresses. It is formatted as: #XXXX where XXXX is the ticket number. This will allow GitHub to automatically link to the issue, making it easier to find information.

NB There are cases where JIRA tickets don't exist in GitHub (Story tickets specifically). In this case, the ticket is to be formatted iXXXX with i as a prefix instead of #

Version Number

After the issue number, we list the version number. Generally, the version number will always be included, and will refer to the version in which the commit will ship - whether enabled for users or not. This will allow easy identification of when/in what version something may have been introduced.

Short Summary

This is a short summary of what your commit is doing.

Merging the PR

Firefox-iOS uses a Squash & Merge policy which results in your entire PR being a single commit on the main commit history.

Clone this wiki locally