Generate changelog from Git commits.
- Python 3.6, 3.7 and 3.8
Latest stable version on PyPI:
pip install matyan
See Basic concepts section to get impression on possible commit methodology and assumptions taken.
Generate changelog skipping orphaned commits:
In some cases you would only want to show what has been done with tickets and skip all non-ticket related commits.
Generate changelog between two releases:
In other cases you would want to show what has been done since last release. The following example would generate changelog since version 0.0.1 to version 0.0.3.
Generate changelog between two branches:
Sometimes you just need to show the changes made on acceptance since last production release. The following example would generate changelog with changes that are on acceptance branch and not yet in master.
Generate changelog with releases info shown
Generate changelog between releases with releases info shown
generate-changelog 0.0.1..0.0.3 --show-releases
Generate changelog between branches with releases info shown
generate-changelog master..dev --show-releases
Generate changelog for the latest release with releases info shown
generate-changelog --latest-release --show-releases
Generate changelog with headings only (no commit messages) and releases info shown
generate-changelog --headings-only --show-releases
Generate changelog between two branches, show unreleased changes only:
generate-changelog master..acceptance --show-releases --unreleased-only
The following renderers are implemented:
- Historical Markdown (for compatibility with
matyanversions prior to 0.4).
generate-changelog --show-releases --renderer=markdown
generate-changelog --show-releases --renderer=rest
generate-changelog --show-releases --renderer=historical-markdown
It’s possible to fetch ticket title and description from Jira. In order for it
to work, you should provide a
The following needs to be added to your
In addition to that, you should put valid Jira credentials into your
.matyan.ini configuration file.
Command to run:
generate-changelog --show-releases --fetch-title --fetch-description
In order to customize names and texts, add a
.matyan.ini in your
project directory, form which you will be running the
[BranchTypes] feature: Feature bugfix: Bugfix hotfix: Hotfix deprecation: Deprecation [OtherBranchType] other: Other [Unreleased] unreleased: Unreleased [IgnoreCommits] exact: more clean up code comments more on docs repo working more on wip commit prefix: more on continue on
Note, that placing
.matyan.ini into the home root will make that
configuration global for all projects. That however could be handy, since local
.matyan.ini files simply override the global ones. For example, you could
use global configuration for storing Jira credentials.
[Jira] url:https://barseghyanartur.atlassian.net/ username:email@example.com token:abcd1234
Tips and tricks¶
Write to file¶
generate-changelog --show-releases 2>&1 | tee changelog.md
Create initial config file¶
Or use tox:
Or use tox to check specific env:
tox -e py36
Keep the following hierarchy.
===== title ===== header ====== sub-header ---------- sub-sub-header ~~~~~~~~~~~~~~ sub-sub-sub-header ^^^^^^^^^^^^^^^^^^ sub-sub-sub-sub-header ++++++++++++++++++++++ sub-sub-sub-sub-sub-header **************************
GPL-2.0-only OR LGPL-2.1-or-later
- Tips and tricks
- Writing documentation
- Indices and tables
- Use cases and basic concepts
- Release history and notes