Skip to content

Commit a8c402b

Browse files
authored
docs: Update changelog generation to use custom sort with git-chglog v0.10.0 (#1202)
1 parent 84a3761 commit a8c402b

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.chglog/CHANGELOG.tpl.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ project adheres to [Semantic Versioning](http://semver.org/).
1313
{{ .Title }}:
1414
{{ range .Commits -}}
1515
{{- if .Subject -}}
16-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
16+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject | upperFirst }}
1717
{{ end -}}
1818
{{ end }}
1919
{{ end -}}
2020
{{ else }}
2121
{{ range .Unreleased.Commits -}}
2222
{{- if .Subject -}}
23-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
23+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject | upperFirst}}
2424
{{ end -}}
2525
{{ end }}
2626
{{ end -}}
@@ -43,14 +43,14 @@ project adheres to [Semantic Versioning](http://semver.org/).
4343
{{ .Title }}:
4444
{{ range .Commits -}}
4545
{{- if .Subject -}}
46-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
46+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject | upperFirst }}
4747
{{ end -}}
4848
{{ end }}
4949
{{ end -}}
5050
{{ else }}
5151
{{ range .Commits -}}
5252
{{- if .Subject -}}
53-
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
53+
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject | upperFirst }}
5454
{{ end -}}
5555
{{ end }}
5656
{{ end -}}

.chglog/config.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,15 @@ options:
1818

1919
commit_groups:
2020
group_by: Type
21-
sort_by: Type
21+
sort_by: Custom
22+
title_order:
23+
- feat
24+
- improvement
25+
- refactor
26+
- fix
27+
- docs
28+
- test
29+
- ci
2230
title_maps:
2331
feat: FEATURES
2432
fix: BUG FIXES

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ TAG_QUERY=v11.0.0..
88
scope ?= "minor"
99

1010
changelog-unrelease:
11-
git-chglog -o $(CHANGELOG_FILE) $(TAG_QUERY)
11+
git-chglog --no-case -o $(CHANGELOG_FILE) $(TAG_QUERY)
1212

1313
changelog:
14-
git-chglog -o $(CHANGELOG_FILE) --next-tag `$(SEMTAG) final -s $(scope) -o -f` $(TAG_QUERY)
14+
git-chglog --no-case -o $(CHANGELOG_FILE) --next-tag `$(SEMTAG) final -s $(scope) -o -f` $(TAG_QUERY)
1515

1616
release:
1717
$(SEMTAG) final -s $(scope)

0 commit comments

Comments
 (0)