Towncrier is a cleaner changelog utility
Gone are the days of persistent merge conflicts with each changelog update. Now you can combined your changelog entries automatically!
towncrier
(docs) is a utility to produce changelogs from projects.
Instead of maintaining a changelog as a file that gets merge conflicts when different feature branches merge, you create
news fragments for each PR. These accumulate into the changelog at release.
To set it up, do the following things.
Add the following snippet to your pyproject.toml file:
[]
[]
= true
[]
= true
= "no-changelog-entry-needed" # default is none
= "skip-changelog-checks"
= "whatsnew-needed"
[]
= "punchbowl"
= "CHANGELOG.rst"
= "changelog/"
= "`#{issue} <https://github.com/punch-mission/punchbowl/pull/{issue}>`__"
= "{version} ({project_date})"
[[]]
= "breaking"
= "Breaking Changes"
= true
[[]]
= "deprecation"
= "Deprecations"
= true
[[]]
= "removal"
= "Removals"
= true
[[]]
= "feature"
= "New Features"
= true
[[]]
= "bugfix"
= "Bug Fixes"
= true
[[]]
= "doc"
= "Documentation"
= true
[[]]
= "trivial"
= "Internal Changes"
= true
Be sure to replace punchbowl
with your package name and user in the package
and issue_format
entries.
Then, enable giles as a bot if you want PR checks by going here.
This will check each PR for a changelog update. If a PR doesn't need a changelog, then you can add the no-changelog-entry-needed
label.
Now anytime you make a PR and have change, create a file in the changelog
folder that ends in one of the following:
- breaking
- deprecation
- removal
- feature
- bugfix
- doc
- trivial
So for example, you might make a file 38.bugfix
if PR 38 is a bugfix.
In the file, you write a description of what that change is, e.g. "Fixed the bug where the refresh button didn't display."
Then, when you want to release simply run towncrier
to populate the CHANGELOG.rst
.
I'm starting to use this with PUNCH software to make development and maintenance easier.