auto-changelog
auto-changelog copied to clipboard
Add ignore-release-pattern option.
As well as ignore-commit-pattern
allows to ignore patterns with a certain Regex, this option allows to ignore releases with a certain pattern.
In my company we can manually create Release Candidates (example: 1.90.0-rc-3) to test features, but at a Git level, these counts as Releases. This pretty much contaminates the Changelog, so we needed to filter these kind of releases from the Changelog to keep it clean.
+1
I think this would lose a lot of potentially useful information from the changelog, based on the fact that the filtering is happening after the diff
for each release is calculated.
So in your example, if 1.90.0
is released after 1.90.0-rc-3
, the changelog entry for 1.90.0
would only contain changes between 1.90.0-rc-3
and 1.90.0
, which may be very few changes or nothing at all. Any changes between 1.90.0-rc-2
and 1.90.0-rc-3
etc would be filtered out and not included anywhere.
It seems like what you need is actually the opposite of --tag-pattern
? So something like --ignore-tag-pattern "-rc-"
which will remove those tags before the diff
is calculated for each release, so your 1.90.0
release includes all the changes since 1.89.0
or whatever was before it.
In fact you may already be able to achieve this something like --tag-pattern "^\d+\.\d+\.\d+$"
which will only use regular semver tags for the changelog.
Personally, I want both - iow, rc2 should show the diff since rc1, and rc3 since rc2, but the REAL release should show the combined diff. That way, every single release is represented in the changelog, and each one contains the relevant changes people need to see.
@ljharb This takes me back to a conversation we had over two years ago. Time flies eh?
ha, that discussion covers the topic better than this one, that's for sure :-)