{{- $repourl := $.Info.RepositoryURL -}} # CHANGELOG All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased]({{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD) {{ if .Unreleased.NoteGroups }} {{ range .Unreleased.NoteGroups -}} ### {{ .Title }} {{ range .Notes -}} {{ .Body }} {{ end -}} {{ end -}} {{ end -}} {{ 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 "#${1}") $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 -}}
{{ else -}}- {{ end -}} {{.Hash.Short}} {{ $subject }} {{- if $list -}} {{ printf " %s " "(closes"}} {{- range $idx, $ref := $list -}}{{ if $idx }}, {{ end -}} #{{ $ref.Ref}}{{ end }}) {{- end -}} {{ if .TrimmedBody -}}{{ printf "\n\n%s\n\n" .TrimmedBody }}
{{ end }} {{ end }} {{ end -}} {{- if .Versions }} {{ range .Versions -}} ## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}[{{ .Tag.Name }}](https://github.com/99designs/gqlgen/releases/tag/{{ .Tag.Name }}){{ end }} - {{ datetime "2006-01-02" .Tag.Date }} {{- if .CommitGroups -}} {{ range .CommitGroups -}} ### {{ .Title }} {{ range .Commits -}} {{- /** Remove markdown urls when there's a pull request linked and replace it with a tag **/ -}} {{- $subject := (regexReplaceAll `URL` (regexReplaceAll `\[#(\d+)\]\(.*?\)` .Subject "#${1}") $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 -}}
{{ else -}}- {{ end -}} {{.Hash.Short}} {{ $subject }} {{- if $list -}} {{ printf " %s " "(closes"}} {{- range $idx, $ref := $list -}}{{ if $idx }}, {{ end -}} #{{ $ref.Ref}}{{ end }}) {{- end -}} - {{ if .Type }}**{{ .Type }}:** {{ end }}{{ if .Subject }}{{ .Subject }}{{ else }}{{ .Header }}{{ end }} {{ end }} {{ end -}} {{ else }} {{ range .Commits -}} {{- /** Remove markdown urls when there's a pull request linked and replace it with a tag **/ -}} {{- $subject := (regexReplaceAll `URL` (regexReplaceAll `\[#(\d+)\]\(.*?\)` .Subject "#${1}") $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 -}}
{{ else -}}- {{ end -}} {{.Hash.Short}} {{ $subject }} {{- if $list -}} {{ printf " %s " "(closes"}} {{- range $idx, $ref := $list -}}{{ if $idx }}, {{ end -}} #{{ $ref.Ref}}{{ end }}) {{- end -}} {{ if .TrimmedBody -}}{{ printf "\n\n%s\n\n" .TrimmedBody }}
{{ end }} {{ end }} {{ end -}} {{ if .NoteGroups }} {{ range .NoteGroups -}} ### {{ .Title }} {{ range .Notes -}} {{ .Body }} {{ end -}} {{ end -}} {{ end -}} {{ end -}} {{ end -}}