Add prefix to commit titles when needed

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2023-09-30 05:50:41 +02:00 committed by Xaymar
parent cfcf975794
commit 6b02b76e6c
1 changed files with 47 additions and 2 deletions

View File

@ -15,13 +15,58 @@ We follow the paradigm of linear history which forbids branches from being merge
A commit should be containing a single change, even if it spans multiple units, and has the following format:
```
short description
prefix: short description
optional long description
```
The short description should be no longer than 120 characters and focus on the important things. The long description is optional, but should be included for larger changes.
#### The appropriate `prefix`
<table>
<tr>
<th>Path(s)</th>
<th>Prefix</th>
<th>Example</th>
</tr>
<tr>
<td>
data/locale
</td>
<td>locale</td>
<td>
<code>data/locale/en-US.ini</code> -> <code>locale</code>
</td>
</tr>
<tr>
<td>components/name</td>
<td>name</td>
<td>
<code>components/shader</code> -> <code>shader</code>
</td>
</tr>
<tr>
<td>
source<br>
templates<br>
data<br>
ui
</td>
<td>core</td>
<td>
<code>ui/main.ui</code> -> <code>core</code>
</td>
</tr>
<tr>
<td>Anything else</td>
<td><b>Omit the prefix</b></td>
<td></td>
</tr>
</table>
If multiple match, apply the prefix that changes the most files. If all are equal, alphabetically sort the prefixes and list comma separated.
</details>