chore: Add CHANGELOG configuration

Closes: #29
Signed-off-by: Michael Gasch <mgasch@vmware.com>
This commit is contained in:
Michael Gasch 2021-05-07 11:39:11 +02:00
parent 21797dccf0
commit 57641800ad
2 changed files with 72 additions and 0 deletions

43
.chglog/CHANGELOG.tpl.md Executable file
View File

@ -0,0 +1,43 @@
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[Release {{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }}
> Release Date: {{ datetime "2006-01-02" .Tag.Date }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ .Subject }}
{{ end }}
{{ end -}}
{{- if .RevertCommits -}}
### ⏮ Reverts
{{ range .RevertCommits -}}
- {{ .Revert.Header }}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### ⚠️ {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
### 📖 Commits
{{ range .Commits -}}
{{ if not .Merge -}}
{{ if not (contains .Header "Update CHANGELOG for" ) -}}
- {{ .Header }} [{{ .Hash.Short }}]
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}

29
.chglog/config.yml Executable file
View File

@ -0,0 +1,29 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/cloudevents/sdk-powershell
options:
commits:
filters:
Type:
- fix
- feat
- chore
commit_groups:
title_maps:
fix: 🐞 Fix
feat: 💫 Feature
chore: 🧹 Chore
header:
pattern: "^(\\w*)\\:\\s(.*)$"
pattern_maps:
- Type
- Subject
refs:
actions:
- Closes
- Fixes
notes:
keywords:
- "BREAKING"