conventional-changelog / conventional-changelog

Generate changelogs and release notes from a project's commit messages and metadata.
ISC License
7.84k stars 713 forks source link

Generated changelog ignores tags on merge commits #571

Open nfantone opened 4 years ago

nfantone commented 4 years ago

I have a clean repository for which I need to generate a new changelog. Here are the all current tags on it:

$ git tag --list
0.1.0
0.1.10
0.1.13
0.1.14
0.1.15
0.1.16
0.1.17
0.1.18
0.1.2
0.1.20
0.1.21
0.1.4
0.1.6
0.1.7
0.1.8
0.1.9
0.2.0
0.3.0
0.4.0
npx -p conventional-changelog-cli -- conventional-changelog -p angular -i CHANGELOG.md -s -r 0

I get back a CHANGELOG.md file containing all changes correctly listed for all versions up to [0.1.21], for some reason. Tags 0.2.0, 0.3.0 and 0.4.0 are ignored.

It looks as though the parsing is failing to detect 0.4.0, 0.2.0 and 0.3.0 tags.

Am I doing anything wrong here?

nfantone commented 4 years ago

After further digging, I realised that the reason why 0.4.0, 0.3.0 and 0.2.0 are not being considered is because those are tagging merge commits.

This seems to be linked to #375. However, after trying out the fixed proposed there, I get back the exact complement of what I'm seeing here: only merge commits, which produces an almost empty CHANGELOG.md containing [0.4.0], [0.3.0] and [0.2.0] headers exclusively.

swernerx commented 4 years ago

I need exactly the same thing here. We have a large mono repo in our business and we would definitely like to have a changelog between the versions as they were made in the past. We figure having this option would be also helpful in cases where something went wrong in the past or where configuration changed over time.

zxiiro commented 3 years ago

Anyone figure out a workaround for this issue?

We'd like to use this tool but all of our tags are on merge commits so the generated notes do not have any tags.

szymon08 commented 3 years ago

Betway