improvement: automate changelog management (#786)

This commit is contained in:
Thierno IB. BARRY
2020-03-17 14:22:22 +01:00
committed by GitHub
parent ca3d1e1199
commit 9fb1a20d82
11 changed files with 863 additions and 58 deletions

66
.chglog/CHANGELOG.tpl.md Normal file
View File

@@ -0,0 +1,66 @@
# Change Log
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/).
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]
{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
{{ .Title }}:
{{ range .Commits -}}
{{- if .Subject -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{- end -}}
{{ end }}
{{ end -}}
{{ else }}
{{ range .Unreleased.Commits -}}
{{- if .Subject -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{- end -}}
{{ end }}
{{ end -}}
{{ end -}}
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
{{ if .CommitGroups -}}
{{ range .CommitGroups -}}
{{ .Title }}:
{{ range .Commits -}}
{{- if .Subject -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{- end -}}
{{ end }}
{{ end -}}
{{ else }}
{{ range .Commits -}}
{{- if .Subject -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{- end -}}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
{{ .Title }}:
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
{{- if .Versions }}
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
{{ range .Versions -}}
{{ if .Tag.Previous -}}
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}

48
.chglog/config.yml Normal file
View File

@@ -0,0 +1,48 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/terraform-aws-modules/terraform-aws-eks
options:
commits:
sort_by: Type
filters:
Type:
- feat
- fix
- improvement
- docs
- refactor
- test
- ci
- chore
commit_groups:
group_by: Type
title_maps:
feat: FEATURES
fix: BUG FIXES
improvement: ENHANCEMENTS
docs: DOCS
refactor: REFACTORS
test: TESTS
ci: CI
chore: CHORES
header:
pattern: "^(\\.+)\\s*:\\s*(.+)$"
pattern_maps:
- Type
- Subject
notes:
keywords:
- BREAKING CHANGE
- NOTES
refs:
actions:
- Closes
- Fixes
- Resolves