diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md index 93c1d8e..c147e22 100755 --- a/.chglog/CHANGELOG.tpl.md +++ b/.chglog/CHANGELOG.tpl.md @@ -6,8 +6,8 @@ ### {{ .Title }} {{ range .Commits -}} -{{ $hash := printf "%s" .Hash }} -{{ $short := (print (index $hash 0) (index $hash 1) (index $hash 2) (index $hash 3) (index $hash 4) (index $hash 5) (index $hash 6)) }} +{{ $hash := .Hash }} +{{ $short := printf "%.7s" $hash }} * {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} ([{{ $short }}]({{ $.Info.RepositoryURL }}/commit/{{ $hash }})) {{ end }} {{ end }} @@ -16,8 +16,8 @@ ### Reverts {{ range .RevertCommits -}} -{{ $hash := printf "%s" .Hash }} -{{ $short := (print (index $hash 0) (index $hash 1) (index $hash 2) (index $hash 3) (index $hash 4) (index $hash 5) (index $hash 6)) }} +{{ $hash := .Hash }} +{{ $short := printf "%.7s" $hash }} * {{ .Revert.Header }} ([{{ $short }}]({{ $.Info.RepositoryURL }}/commit/{{ $hash }})) {{ end }} {{ end }} @@ -26,8 +26,8 @@ ### Pull Requests {{ range .MergeCommits -}} -{{ $hash := printf "%s" .Hash }} -{{ $short := (print (index $hash 0) (index $hash 1) (index $hash 2) (index $hash 3) (index $hash 4) (index $hash 5) (index $hash 6)) }} +{{ $hash := .Hash }} +{{ $short := printf "%.7s" $hash }} * {{ .Header }} ([{{ $short }}]({{ $.Info.RepositoryURL }}/commit/{{ $hash }})) {{ end }} {{ end }}