1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_restic_archiver.git synced 2024-08-16 10:09:49 +02:00

add: git-chglog

This commit is contained in:
Matthias Leutenegger 2020-11-12 16:25:48 +01:00
parent 5d1b9dc53c
commit 3fe87de594
3 changed files with 95 additions and 0 deletions

59
.chglog/CHANGELOG.tpl.md Normal file
View file

@ -0,0 +1,59 @@
{{ if .Versions -}}
<a name="unreleased"></a>
## [Unreleased]
{{ if .Unreleased.CommitGroups -}}
{{ range .Unreleased.CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ 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 }}
{{ range .CommitGroups -}}
### {{ .Title }}
{{ range .Commits -}}
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
{{ end }}
{{ end -}}
{{- if .RevertCommits -}}
### Reverts
{{ range .RevertCommits -}}
- {{ .Revert.Header }}
{{ end }}
{{ end -}}
{{- if .MergeCommits -}}
### Pull Requests
{{ range .MergeCommits -}}
- {{ .Header }}
{{ end }}
{{ end -}}
{{- if .NoteGroups -}}
{{ range .NoteGroups -}}
### {{ .Title }}
{{ range .Notes }}
{{ .Body }}
{{ end }}
{{ end -}}
{{ end -}}
{{ end -}}
## History
For versions before 0.2.9, see [HISTORY.md](HISTORY.md)
{{- 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 -}}

31
.chglog/config.yml Normal file
View file

@ -0,0 +1,31 @@
style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/syntro-opensource/ansible.silverstripe
options:
commits:
filters:
Type:
- add
- fix
- change
- remove
- deprecate
- Bump
commit_groups:
title_maps:
add: 🍰 Added
fix: 🐞 Fixed
change: 🔧 Changed
deprecate: 💀 Deprecated
remove: 🗑 Removed
Bump: 🧬 Dependencies
header:
pattern: "^(\\w*)\\:?\\s(.*)$"
pattern_maps:
- Type
- Subject
notes:
keywords:
- BREAKING CHANGE

5
package.json Normal file
View file

@ -0,0 +1,5 @@
{
"scripts": {
"changelog": "git-chglog 0.2.8.."
}
}