A command line utility to generate CHANGELOG.md for a gitlab repository.
The merged merge requests tagged with a milestone will be collected to generate the changelog.
# pip install gitlab-changelog-gen# chg-gen init
Gitlab host: https://your-gitlab.com
Gitlab group: your-group
Gitlab project: your-project
Gitlab private token: your-token
# chg-gen output
Changelog is generated to './CHANGELOG.md' success.Before generate the changelog file, you need to run chg-gen init to init the config first. The default config file
is .chg-gen.config under the working directory.
The config file is YAML format, and this is the instructions:
// host address of your gitlab
host: https://gitlab.example
// group name of your repo
group: foo
// project name of your repo
project: bar
// private_token to access your gitlab API
private_token: yourtokenThe generation rules of a changelog consist of:
- Release: A
releasesection containsfeaturesandbug fixes. The release name is the title ofmilestoneof the project. - Features: Composed by the merged
merge requestslabeled withfeatureorenhancement. - Bug Fixes: Composed by the merged
merge requestslabeled withbug. - Change Items: Components of
FeaturesandBug Fixes. The content is the title of themerge requestwith its reference and theauthorreference.
An example of CHANGELOG.md.