.chglog/CHANGELOG-full-history.tpl.md
{{- $repourl := $.Info.RepositoryURL -}}
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
<a name="unreleased"></a>
{{ if .Unreleased.NoteGroups }} {{ range .Unreleased.NoteGroups -}}
{{ range .Notes -}} {{ .Body }} {{ end -}} <!-- end of Notes --> {{ end -}} <!-- end of NoteGroups --> {{ end -}} <!-- end of if --> {{ range .Unreleased.CommitGroups }} {{ range .Commits -}}
{{- /** Remove markdown urls when there's a pull request linked and replace it with a tag / -}}
{{- $subject := (regexReplaceAll URL (regexReplaceAll \[#(\d+)\]\(.*?\) .Subject "<a href="URL/pull/${1}">#${1}</a>") $repourl) -}}
{{- / Filter out refs mentioned in the title / -}}
{{- $list := (list) -}}
{{- range $idx, $ref := .Refs -}}
{{- if not (regexMatch $ref.Ref $subject) -}}
{{ $list = append $list $ref }}
{{- end -}}
{{- end -}}
{{- / end custom variables **/ -}}
{{ if .TrimmedBody -}}<dl><dd><details><summary>{{ else -}}- {{ end -}} <a href="{{$repourl}}/commit/{{.Hash.Long}}"><tt>{{.Hash.Short}}</tt></a> {{ $subject }} {{- if $list -}} {{ printf " %s " "(closes"}} {{- range $idx, $ref := $list -}}{{ if $idx }}, {{ end -}} <a href="{{ $repourl }}/issues/{{ $ref.Ref}}"> #{{ $ref.Ref}}</a>{{ end }}) {{- end -}} {{ if .TrimmedBody -}}</summary>{{ printf "\n\n%s\n\n" .TrimmedBody }}</details></dd></dl>{{ end }}
{{ end }} <!-- end of Commits --> {{ end -}} <!-- end of CommitGroups -->
{{- if .Versions }} {{ range .Versions -}} <a name="{{ .Tag.Name }}"></a>
{{- if .CommitGroups -}} {{ range .CommitGroups -}}
{{ range .Commits -}}
{{- /** Remove markdown urls when there's a pull request linked and replace it with a tag / -}}
{{- $subject := (regexReplaceAll URL (regexReplaceAll \[#(\d+)\]\(.*?\) .Subject "<a href="URL/pull/${1}">#${1}</a>") $repourl) -}}
{{- / Filter out refs mentioned in the title / -}}
{{- $list := (list) -}}
{{- range $idx, $ref := .Refs -}}
{{- if not (regexMatch $ref.Ref $subject) -}}
{{ $list = append $list $ref }}
{{- end -}}
{{- end -}}
{{- / end custom varaibles **/ -}}
{{ if .TrimmedBody -}}<dl><dd><details><summary>{{ else -}}- {{ end -}} <a href="{{$repourl}}/commit/{{.Hash.Long}}"><tt>{{.Hash.Short}}</tt></a> {{ $subject }} {{- if $list -}} {{ printf " %s " "(closes"}} {{- range $idx, $ref := $list -}}{{ if $idx }}, {{ end -}} <a href="{{ $repourl }}/issues/{{ $ref.Ref}}"> #{{ $ref.Ref}}</a>{{ end }}) {{- end -}}
{{- /** Remove markdown urls when there's a pull request linked and replace it with a tag / -}}
{{- $subject := (regexReplaceAll URL (regexReplaceAll \[#(\d+)\]\(.*?\) .Subject "<a href="URL/pull/${1}">#${1}</a>") $repourl) -}}
{{- / Filter out refs mentioned in the title / -}}
{{- $list := (list) -}}
{{- range $idx, $ref := .Refs -}}
{{- if not (regexMatch $ref.Ref $subject) -}}
{{ $list = append $list $ref }}
{{- end -}}
{{- end -}}
{{- / end custom variables **/ -}}
{{ if .TrimmedBody -}}<dl><dd><details><summary>{{ else -}}- {{ end -}} <a href="{{$repourl}}/commit/{{.Hash.Long}}"><tt>{{.Hash.Short}}</tt></a> {{ $subject }} {{- if $list -}} {{ printf " %s " "(closes"}} {{- range $idx, $ref := $list -}}{{ if $idx }}, {{ end -}} <a href="{{ $repourl }}/issues/{{ $ref.Ref}}"> #{{ $ref.Ref}}</a>{{ end }}) {{- end -}} {{ if .TrimmedBody -}}</summary>{{ printf "\n\n%s\n\n" .TrimmedBody }}</details></dd></dl>{{ end }}
{{ end }} <!-- end of Commits --> {{ end -}} <!-- end of Else -->
{{ if .NoteGroups }} {{ range .NoteGroups -}}
{{ range .Notes -}} {{ .Body }} {{ end -}} <!-- end of Notes --> {{ end -}} <!-- end of NoteGroups --> {{ end -}} <!-- end of If NoteGroups --> {{ end -}} <!-- end of Versions --> {{ end -}} <!-- end of If Versions -->