Changelog Generation
Changelogs help document important changes.
To generate a (full) changelog from the repository root, run:
(venv) $ gitchangelog
We use gitchangelog
to create the changelog automatically. It
examines git commit history and uses custom “filters” to produce its
output. The configurations for this are in the files .gitchangelog.rc
(if used locally) and gitchangelog.rc.github.release
(used by the
gitchangelog-action).
To make your commits even more useful/readable, you should use good
commit messages and consider using the gitchangelog message modifiers.
Since the .gitchangelog.rc
is actually written in Python, it becomes
quite dynamic, thus the configured modifiers and associated documentation
are usually documented in the file itself (unless someone strips out all
the comments). For this config, the message format uses 3 types of
modifier:
Message 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 developers (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 additional 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-indented some lines !cosmetic
new: dev: updated code to be compatible with last version of killer lib.
fix: pkg: updated year of license coverage.
new: test: added a bunch of test around user usability of feature X.
fix: typo in spelling my name in comment. !minor
See the current .gitchangelog.rc in the redis-ipc repo for more details.
Read more about gitchangelog
here.
Sections
The sections in the changelog are created from the git log commit
messages, and are parsed using the regex defined in the
.gitchangelog.rc
configuration file.