Skip to content

Commit

Permalink
:chg :doc adding section about commit formatting to docs !minor [ci-s…
Browse files Browse the repository at this point in the history
…kip]
  • Loading branch information
jduncan committed Feb 22, 2019
1 parent 63c0a41 commit 8987c73
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,61 @@ Code contributions
-------------------
Of course code contributions are welcome. Please follow the standard Github PR process.

Commit format
--------------
We've just started using `gitchangelog <https://pypi.org/project/gitchangelog/>`__ to format git commits and generate a changelog. Please follow their example file like below:

::

Format:

ACTION: [AUDIENCE:] COMMIT_MSG [!TAG ...]

Description:
ACTION is one of 'chg', 'fix', 'new'

Is WHAT the change is about.

'chg' is for refactor, small improvement, cosmetic changes...
'fix' is for bug fixes
'new' is for new features, big improvement

AUDIENCE is optional and one of 'dev', 'usr', 'pkg', 'test', 'doc'

Is WHO is concerned by the change.

'dev' is for developpers (API changes, refactors...)
'usr' is for final users (UI changes)
'pkg' is for packagers (packaging changes)
'test' is for testers (test only related changes)
'doc' is for doc guys (doc only changes)

COMMIT_MSG is ... well ... the commit message itself.

TAGs are additionnal adjective as 'refactor' 'minor' 'cosmetic'

They are preceded with a '!' or a '@' (prefer the former, as the
latter is wrongly interpreted in github.) Commonly used tags are:

'refactor' is obviously for refactoring code only
'minor' is for a very meaningless change (a typo, adding a comment)
'cosmetic' is for cosmetic driven change (re-indentation, 80-col...)
'wip' is for partial functionality but complete subfunctionality.

Example:

new: usr: support of bazaar implemented
chg: re-indentend some lines !cosmetic
new: dev: updated code to be compatible with last version of killer lib.
fix: pkg: updated year of licence coverage.
new: test: added a bunch of test around user usability of feature X.
fix: typo in spelling my name in comment. !minor

Please note that multi-line commit message are supported, and only the
first line will be considered as the "summary" of the commit message. So
tags, and other rules only applies to the summary. The body of the commit
message will be displayed in the changelog without reformatting.


Testing
--------
Expand Down

0 comments on commit 8987c73

Please sign in to comment.