Generate changelog from git log with convencional commits'
Project description
mkchangelog
Use this CLI tool to create a changelog for a project from the git log using the conventional commits
scheme.
Features:
Changelog generation:
- generate full CHANGELOG.[md,rst,txt,json]
mkchangelog generate --renderer <markdown | rst | txt | json>
- limit included commit types
mkchangelog generate --types feat,fix,refactor
- group commits by
type
and byscope
also - include unreleased changes section (
mkchangelog generate --include-unreleased
) - pass own template by
--renderer template --template ./path/to/template.jinja
- check internal templates
Configuration generation:
- configure
mkchangelog
using.mkchangelog
INI file (mkchangelog config --generate > .mkchangelog
)
Commit message helper:
- create
mkchangelog.txt
with proper commit messagemkchangelog commit [--stdout]
, thengit commit -F message.txt
Bump version:
- compute and bump next version (using
semver
)mkchangelog bump
Table of Contents
Installation
pip install mkchangelog
pip install mkchangelog[colors] # for console colorized output
Usage
The list of versions is taken from list of signed git tags detected by prefix (default v
, f.e. v1.3.4
).
To generate changelog for current and all previous versions (signed tags) on the screen:
mkchangelog generate
To generate commit message use:
$ mkchangelog commit --stdout
Git Commit Format: type(scope): summary
Commit Type [build,chore,ci,dev,docs,FEAT,fix,perf,refactor,style,test,translations]: feat
Scope: (optional): commands
Summary line: add `mkchangelog commit` command to generate proper commit message
Is breaking change? [y/N]
Long description (body): The message be displayed at stdout by passing `--stdout` parameter. Otherwise will be saved as `message.txt` file.
---
feat(commands): add `mkchangelog commit` command to generate proper commit message
The message be displayed at stdout by passing `--stdout` parameter. Otherwise will be saved as `message.txt` file.
---
Experimental (but works somehow) commands:
Interactive tool to generate changelog, bump version, commit changelog and tag version:
mkchangelog bump - interactive tool; compute next versions from `feat`, `fix` and `breaking_changes`, optionaly write `CHANGELOG.md`, commit and tag next version
Configuration
You can change default configuration using .mkchangelog
(ini format) file in current directory.
Default configuration is:
[GENERAL]
changelog_title = Changelog ; title of generated text changelog
commit_type_default_priority = 10 ; default priority for rendered commit types
default_renderer = markdown ; default renderer (use `-r <renderer` to overwrite)
git_tag_prefix = v ; default git tag prefix for versions
short_commit_types_list = fix,feat ; default list of commit types included in changelog (use `-t <type,type,.. | all>` to overwrite)
[commit_types] ; available commit prefixes along with their names used to render headers
build = Build
chore = Chore
ci = CI
dev = Dev
docs = Docs
feat = Features
fix = Fixes
perf = Performance
refactor = Refactors
style = Style
test = Test
translations = Translations
[commit_types_priorities] ; prioritize commit types to render them earlier, check `commit_type_default_priority`
feat = 40
fix = 30
refactor = 20
; vim: ft=ini
Contributing
Install pre-commit
pip install pre-commit
pre-commit install
Run tests
hatch run all:test
Linting
hatch run lint:all
License
mkchangelog
is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mkchangelog-1.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e552c282304e832ad791043568e0b29b659ed27f338c2ed9f7da0bb378955aef |
|
MD5 | 5b4d988a71b74cdb5c6e2520db443fb1 |
|
BLAKE2b-256 | 7fcb1b5e3828293674a47f311daf3f47a971f4337a61fc190b100b7e5fb426e4 |