Skip to content

Commit

Permalink
🎨 update changelog item format
Browse files Browse the repository at this point in the history
closes #81
  • Loading branch information
kkharji committed Aug 18, 2021
1 parent 26c5d22 commit 2d24f86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
14 changes: 6 additions & 8 deletions .github/chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
{{ $repourl := .Info.RepositoryURL -}}
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>

## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }}
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $repourl }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }}

> {{ datetime "2006-01-02" .Tag.Date }}

{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}} {{ $subject := .Subject }} {{ if .TrimmedBody }}
<dl><dd><details><summary>[{{ .Hash.Short }}]({{ $repourl }}/commit/{{ .Hash.Long }}): {{ $subject }} {{- range $idx, $ref := .Refs }}{{if not (regexMatch $ref.Ref $subject)}}{{- if $idx }},{{ end }} ([#{{ $ref.Ref }}]({{ $repourl }}/issues/{{ $ref.Ref }}){{ end -}}){{end}}</summary>

{{ range .Commits -}}
{{if .Body }}
<dl><dd><details><summary><a href="{{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }}"> {{ .Subject }}</a></summary>

{{ .Body }}
{{ .TrimmedBody }}
</details></dd></dl>
{{ else }}
- [{{ .Subject }}]({{ $.Info.RepositoryURL }}/commit/{{ .Hash.Long }})
- [{{ .Hash.Short }}]({{ $repourl }}/commit/{{ .Hash.Long }}): {{ $subject }} {{- range $idx, $ref := .Refs }}{{if not (regexMatch $ref.Ref $subject)}}{{- if $idx }},{{ end }} ([#{{ $ref.Ref }}]({{ $repourl }}/issues/{{ $ref.Ref }}){{ end -}}){{end}}
{{ end }}
{{ end }}
{{ end -}}
Expand Down
5 changes: 4 additions & 1 deletion .github/chglog/config.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
style: github
style: "github"
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/tami5/sql.nvim
options:
refs:
actions:
- closes
commits:
filters:
Type:
Expand Down

0 comments on commit 2d24f86

Please sign in to comment.