Skip to content

Commit 385b756

Browse files
committed
feat(dev-tool): add git-chglog config
1 parent 1f14665 commit 385b756

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
6+
7+
{{ range .Versions }}
8+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
9+
{{ range .CommitGroups }}
10+
### {{ .Title }}
11+
{{ range .Commits }}
12+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
13+
{{ end -}}
14+
{{ end -}}
15+
16+
{{- if .NoteGroups -}}
17+
{{ range .NoteGroups -}}
18+
### {{ .Title }}
19+
{{ range .Notes }}
20+
{{ .Body }}
21+
{{ end }}
22+
{{ end -}}
23+
{{ end }}
24+
Full Changelog: {{ if .Tag.Previous }}[{{ .Tag.Previous.Name }}...{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/commits/{{ .Tag.Name }}){{ end }}
25+
{{ end }}
26+
27+
{{- if .Versions }}
28+
{{ range .Versions -}}
29+
{{ if .Tag.Previous -}}
30+
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
31+
{{ end -}}
32+
{{ end -}}
33+
{{ end -}}

.chglog/config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
style: github
2+
template: CHANGELOG.tpl.md
3+
info:
4+
title: CHANGELOG
5+
repository_url: https://github.com/ansidev/sample-gitflow-release-workflows
6+
options:
7+
commits:
8+
filters:
9+
Type:
10+
- feat
11+
- fix
12+
- perf
13+
- refactor
14+
- docs
15+
commit_groups:
16+
title_maps:
17+
feat: Features
18+
fix: Bug Fixes
19+
perf: Performance Improvements
20+
refactor: Code Refactoring
21+
docs: Documentations
22+
header:
23+
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
24+
pattern_maps:
25+
- Type
26+
- Scope
27+
- Subject
28+
notes:
29+
keywords:
30+
- BREAKING CHANGE

0 commit comments

Comments
 (0)