summaryrefslogtreecommitdiff
path: root/Documentation/source/contributing/commit-messages.rst
blob: 22bda0dbbbf39c1ec4ad443020fc78d677c7e14e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
Commit Messages
===============

Commit messages should be structured enough to support readable history and
future changelog generation.

Format
------

.. code-block:: text

   <type>(<scope>): <short summary>

   <body>

   <footer>

The header is required. The body is recommended for all non-trivial changes and
should explain why the change exists.

Types
-----

.. list-table::
   :header-rows: 1
   :widths: 18 52

   * - Type
     - Use
   * - ``build``
     - Build system or dependency changes.
   * - ``ci``
     - CI configuration and automation.
   * - ``docs``
     - Documentation-only changes.
   * - ``feat``
     - New user-facing capability.
   * - ``fix``
     - Bug fix.
   * - ``perf``
     - Performance improvement.
   * - ``refactor``
     - Code change that does not add behavior or fix a bug.
   * - ``test``
     - Test additions or corrections.

Scopes
------

Use a scope when it clarifies ownership. Recommended repository scopes:

* ``app``;
* ``payload``;
* ``auth``;
* ``comments``;
* ``db``;
* ``ui``;
* ``email``;
* ``docs``;
* ``tooling``.

Summary Rules
-------------

* Use imperative present tense.
* Do not capitalize the first word unless it is a proper noun.
* Do not end the summary with a period.
* Keep the summary concise.

Examples
--------

.. code-block:: text

   feat(comments): add moderation role checks

   fix(feed): keep rss canonical path consistent

   docs: add Sphinx architecture guide

Reverts
-------

Revert commits should start with ``revert:`` and include the SHA of the commit
being reverted in the body.