Child pages
  • How to write a commit message

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

When you contribute code to the PrestaShop project (through Github), we ask that you strictly use the PrestaShop way of writing a commit/pull request message. This way, when building the code history, your commit message will fit nicely with the ones from the PrestaShop developers and contributors.

Note

The convention were changed on May 5th, 2016, and are now much simpler.

 

Table of Contents

Commit naming convention

The commit's name must be in English, and should be formatted like this:

Code Block
[type] category : short description

The title of the pull request should be the same as its commit, and must follow the same convention.

If the pull request has several commits, the title of the pull request should either use the name of the most important commit, or should reflect the overall change of the pull request.

Type

The type is the general idea behind your commit: are you fixing a bug, making an improvement, etc.?

Type

Meaning

[-]

Bug fix.

[*]

Improvement.

[+]

New feature.

[~]

Feature deprecation.

Please make sure that one commit/pull request does only one thing. If you made both a fix and an improvement in the code, either use the most important change in the commit message, or make two commits/pull request.

Category

The category is the portion of the project to which your changes apply to.

Category

Meaning

FO

Front office (theme, front controller, images, CSS, JavaScript, etc.).

BO

Back office (theme, admin controller, images, CSS, JavaScript, etc.).

CORECOThe core of the software itself: classes, controllers, etc.

InstallerIN

All the files in the /install folder.

TR

The translation files.

MO

Modules. Please specify the module's name in the content of commit message.

Deprecated

When deprecating some code. Please specify the class name and its function name.

Security

Security fixes, such as XSS fixes.

Project

Changes affecting the entire project.

PDF

PDF template modifications.

WS

Web Service.

LO

Localization pack.

TESTTEUnit tests or functional test.

...

Here are a few sample messages:

Code Block
languagetext
[-] BO : Fixed bug while updating images in AdminProduct
[*] FO : You can now buy products without TVA
[+] MO : New RSS Feed module
[~] Deprecated : Product::getReductionValue()

Adding the correct license to new files

...