From 74f28779b4be7fe010f0c6e6cc32a38f536490c4 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Wed, 22 Sep 2021 11:39:26 +0200 Subject: [PATCH] improve changelog template --- .chglog | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 .chglog diff --git a/.chglog b/.chglog new file mode 100755 index 0000000..4d6bff8 --- /dev/null +++ b/.chglog @@ -0,0 +1,23 @@ +# Changelog + +{{ range .Versions -}} +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }}) + +{{ range .CommitGroups -}} +### {{ .Title }} + +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ (regexReplaceAll "(Co-\\w*-by.*)" .Subject "") | trim }} +{{ end }} +{{- end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} + +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}}