git-cliff
git-cliff copied to clipboard
Rerender a specific tag/unreleased in the changelog
Describe the solution you'd like
I would like to use git-cliff in a GitHub action that runs after every merged PR. Updating the [unreleased] section.
My initial instinct was that using the --prepend would have this behavior.
Describe alternatives you've considered
I could write some find replace code to manually do the replacement using the output of git-cliff.
Additional context
Example of the wokflow I'm looking for:
# CHANGELOG
## [1.2.3]
- change by @person in #1234
git merge feature/x
git-cliff -u --prepend changelog.md
# CHANGELOG
## [unreleased]
- feature x by @person in #1235
## [1.2.3]
- change by @person in #1234
git merge feature/y
git-cliff -u --prepend changelog.md
# CHANGELOG
## [unreleased]
- feature y by @person in #1236
- feature x by @person in #1235
## [1.2.3]
- change by @person in #1234
Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️
Also reported in #544
FWIW we can use the markdown crate for parsing the changelog.