orhun / git-cliff

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

Optional unconventional commit parsing into message/body/footer #746

Open approximate opened 1 week ago

approximate commented 1 week ago

Is there an existing issue or pull request for this?

Feature description

Right now unconventional commits are not parsed at all: regardless of the conventional_commits value, as soon as the commit is identified as unconventional, the parsing into message, body, and footers does not happen.

However, still parsing the message might be useful in certain circumstances:

I believe that having an option to enable commit message parsing for all commits, regardless of their type, solves many such problems,

I also believe that having a relatively established format convention (footers are recognized by git, and message is separated from the body by a single blank line, which is respected by git log --oneline) makes this feature not very controversial, even when conventional commit spec is not followed by the dev team, but they want to use git-cliff for changelog generation.

Last but not least, thanks a lot for a great product, your work is very much appreciated!

Desired solution

New configuration option "parse_commit_message" with possible values "always", "never", "conventional_only" (default value, compatible with current behaviour).

Whitespace characters should be trimmed from each parsed part of the commit.

Alternatives considered

Using built-in templating filters is possible in certain cases.

Additional context

No response

welcome[bot] commented 1 week ago

Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️