Skip to content

Commit cb8dd9a

Browse files
authored
Merge pull request #5033 from evolvedbinary/doc/prefix
[doc] commit naming convention
2 parents ca6b5ff + 1b018fc commit cb8dd9a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

CONTRIBUTING.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,42 @@ Support branches? [support/]
169169
Version tag prefix? [] eXist-
170170
Hooks and filters directory? [.git/hooks]
171171
```
172+
173+
174+
## Commit Messages
175+
Commits to eXist-db by developers *should* follow the Git [Commit Guidelines](https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#_commit_guidelines). In addition the summary line of the commit message *must* be prefixed with a label from our controlled list that helps us to better understand the commit and also to generate Change Logs.
176+
177+
### Commit Labels
178+
Our controlled list of commit labels that should be prefixed to each commit summary is:
179+
180+
* `[feature]`
181+
This should be used when a commit adds a new feature.
182+
* `[bugfix]`
183+
This should be used when a commit addresses a bug or issue.
184+
* `[refactor]`
185+
This should be used when a commit is simply refactoring existing code.
186+
* `[optimize]`
187+
This should be used when a commit is refactoring existing code to provide a performance and/or memory optimization.
188+
* `[ignore]`
189+
This should be used when code is cleaned up by automated means, e.g. reformatting.
190+
* `[doc]`
191+
This should be used for documentation.
192+
* `[test]`
193+
This should be used when a commit solely contains changes to existing tests or adds further tests.
194+
* `[ci]`
195+
This should be used when a commit solely makes changes to CI configuration.
196+
197+
In addition any commit that addresses a GitHub issue, should have an additonal line in its commit after the summary and before any fuller explaination that takes this form:
198+
```
199+
Closes https://github.com/eXist-db/exist/issues/<github-issue-number>
200+
```
201+
202+
### Commit Message Example
203+
For example, here is a correctly formatted commit message:
204+
205+
```
206+
[bugfix] Fix relative paths in EXPath classpath.txt files.
207+
208+
Closes https://github.com/eXist-db/exist/issues/4901
209+
We now store the path of Jar files in each EXPath Package's `.exist/classpath.txt` file relative to the package's `content/` sub-folder.
210+
```

0 commit comments

Comments
 (0)