go-semantic-release / semantic-release

📦🚀 semantic-release written in Go
https://go-semantic-release.xyz
MIT License
395 stars 43 forks source link

Customizing release notes #148

Closed grzesuav closed 11 months ago

grzesuav commented 1 year ago

Hi,

I would like to customize release notes, used in changelog and github releases.

I.e. I would like to add commit body there, and mention author of the commit.

Is is possible ?

If not, in which plugins I would need to add changes ?

christophwitzko commented 1 year ago

Hi @grzesuav,

The default changelog generator plugin takes care of generating the changelog. Depending on what you want to extend exactly, you can either extend the default one or create a new plugin. Do you have an example changelog of how it should look like?

grzesuav commented 1 year ago

hi @christophwitzko , I would like to extend it in form i.e.

(deps): Upgrade some dependency (#issueNumberIfPresent) - by @author
christophwitzko commented 1 year ago

Hi @grzesuav, sounds good! I suggest creating a separate plugin for this. 👍

Furthermore, at the moment, semantic-release is unaware of the commit author, so we would need to extend all provider plugins first. I will start with this in the next couple of days (#149). Next, if you are interested, I can help you set up a new plugin and define the changelog format.

Cheers, Chris

christophwitzko commented 1 year ago

I am also thinking of a changelog-generator-template that accepts a go template string and allows different customizations.

christophwitzko commented 1 year ago

Hey @grzesuav, I added templating to the default changelog-generator plugin: https://github.com/go-semantic-release/changelog-generator-default#format-commit-template

You can now use the --changelog-generator-opt CLI flag to customize the commit message rendering, e.g., --changelog-generator-opt "format_commit_template=* {{with .Scope -}} **{{.}}:** {{end}} {{- .Message}} ({{trimSHA .SHA}}) {{- with index .Annotations \"author_login\" }} - by @{{.}} {{- end}}"

The next step would be to make release notes fully customizable in a separate plugin 👍

grzesuav commented 1 year ago

@christophwitzko thanks ! Will try that