orhun / git-cliff

A highly customizable Changelog Generator that follows Conventional Commit specifications ⛰️
https://git-cliff.org
Apache License 2.0
8.7k stars 185 forks source link

Does not work with conventional Pull Request commit messages without body #6

Closed mjhipp closed 3 years ago

mjhipp commented 3 years ago

Describe the bug Fails to parse conventional commit messages made from squashing and merging Pull Requests if there is no body message.

To Reproduce Steps to reproduce the behavior:

  1. Squash and merge a pull request (using conventional commits), without adding a body message
  2. Try to create a changelog using extra verbose option
  3. See the TRACE messages and the missing commits from the changelog

Expected behavior These PR commit messages can be parsed as normal

Screenshots/Logs I did these steps on a fork of this repo: https://github.com/mjhipp/git-cliff

Created pull requests, and merged them:

Screen Shot 2021-09-02 at 4 52 55 PM

one of them I added an extra message:

Screen Shot 2021-09-02 at 4 49 25 PM

The git log:

Screen Shot 2021-09-02 at 4 55 01 PM

Then tried to create a changelog:

Screen Shot 2021-09-02 at 5 09 07 PM

It is not the parenthesis or #, because it works if I commit directly:

Screen Shot 2021-09-02 at 5 12 11 PM

Screen Shot 2021-09-02 at 5 12 22 PM

If I perform an interactive rebase and "reword" the commits, without actually changing anything, the commits can then be parsed:

Screen Shot 2021-09-02 at 5 15 31 PM Screen Shot 2021-09-02 at 5 16 28 PM

System (please complete the following information):

Additional context Sorry for the long post! This is a great tool and I would really like to be able to use it with squashed PRs!

mjhipp commented 3 years ago

This has already been fixed upstream! https://github.com/crate-ci/git-conventional/releases/tag/v0.10.1

https://github.com/crate-ci/git-conventional/issues/12#issuecomment-912587335

https://github.com/orhun/git-cliff/blob/ae8821aaa537f597762206647c18e9ac69289b6a/git-cliff-core/Cargo.toml#L31-L33

orhun commented 3 years ago

Thanks for investigating/reporting this! I'll release a new version to fix this soon.