tomasbjerre / git-changelog-maven-plugin

Maven plugin that can generate a changelog, or releasenotes, from git repository
Other
80 stars 36 forks source link

replacing/appending #[0-9]+ in commit title or message with issue link #29

Open edeso opened 3 years ago

edeso commented 3 years ago

is there a way to keep commit order but replace thes issue pattern in the messages with the proper github link? similarily to what github does in the web interface?

e.g.

2021.05.24 14:40:00 - Michaël Michaud - https://github.com/openjump-gis/openjump/commit/b20760f04a5fe9e
Fix #23[https://github.com/openjump-gis/openjump/issues/23] about wms base url including parameters

instead of plain

2021.05.24 14:40:00 - Michaël Michaud - https://github.com/openjump-gis/openjump/commit/b20760f04a5fe9e
Fix #23 about wms base url including parameters

the current template looks like


${project.artifactId} ${project.version} Changelog

{{#tags}}
{{name}}

{{#commits}}
{{{commitTime}}} - {{{authorName}}} - https://github.com/{{{ownerName}}}/{{{repoName}}}/commit/{{{hash}}}
{{{messageTitle}}}
{{#messageBodyItems}}
  {{{.}}}
{{/messageBodyItems}}

{{/commits}}

{{/tags}}
tomasbjerre commented 3 years ago

I am adding support for helpers in the library, it will solve this kind of problems. So this is work in progress.

tomasbjerre commented 3 years ago

I released 1.72 now.

It adds support for custom helpers, see: https://github.com/tomasbjerre/git-changelog-maven-plugin#example---custom-helpers

Perhaps that helps you.

You should also be able to solve this with custom issue: https://github.com/tomasbjerre/git-changelog-maven-plugin/blob/master/git-changelog-maven-plugin-example/pom.xml#L324

In combination with <removeIssueFromMessage>true</removeIssueFromMessage>.