-
Notifications
You must be signed in to change notification settings - Fork 258
Description
Description
The default changelog template should provide an easy way for users to get things like the short description (subject of the commit vs. all lines of the commit message), the type, scope, etc. on their own.
This would avoid unexpected behavior like what's seen in the existing python-semantic-release
changelog, with things like Co-Authored-By:
showing up in the generated markdown, and would make the changelog more readable in cases where there are bulleted lists in the body of the commit, since the changelog itself is also bulleted. It would be nice to be able to get the scope, type, and short message via variables vs. having to do all of this within the template (see #924 for example)
It should also force a specific style of newline (currently, if the commits have ^M
s in them, it seems like they'll end up in the generated changelog).
Use cases
https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.md
Avoid confusing stuff like this in the changelog (where the ------
gets converted into something that breaks up the markdown, and where things like Co-Authored-By
get inserted in randomly).
Also, you could potentially do something like this
* {%-if foo.scope -%}**{{ foo.scope }}**: {%- endif -%}{{ foo.short_message }} ([`{{ commit.commit.hexsha[:7] }}`]({{ commit.commit.hexsha | commit_hash_url }}))
(not sure if that would be within commit
or some other hierarchy) to get
* **foobar**: add xyz ([`93e4cca`](https://github.com/someorg/somerepo/commit/93e4ccab200eaca9e0fbaa0fd52be0656b6165c0))
from the input
feat(foobar): add xyz
* Here is a longer set of bulleted or non bulleted descriptions from the body of
the commit
(note that type is stripped and scope is now available separately)