Skip to content

Commit 9723984

Browse files
committed
chore(ci): fix changelog generation
1 parent b923cd0 commit 9723984

3 files changed

Lines changed: 1119 additions & 278 deletions

File tree

.chglog/CHANGELOG.tpl.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!-- changelog is partially generated, so it doesn't follow headings and required structure, so we disable it. -->
2+
<!-- markdownlint-disable -->
3+
4+
{{ if .Versions -}}
5+
<a name="unreleased"></a>
6+
# Unreleased
7+
8+
{{ if .Unreleased.CommitGroups -}}
9+
{{ range .Unreleased.CommitGroups -}}
10+
## {{ .Title }}
11+
12+
{{ range .Commits -}}
13+
{{ if and (not (hasPrefix .Subject "changelog rebuild")) (not (hasPrefix .Subject "layer docs update")) (not (hasPrefix .Subject "bump version to")) -}}
14+
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
15+
{{ end -}}
16+
{{ end }}
17+
{{ end -}}
18+
{{ end -}}
19+
{{ end -}}
20+
21+
{{ range .Versions }}
22+
<a name="{{ .Tag.Name }}"></a>
23+
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }}
24+
{{ range .CommitGroups -}}
25+
26+
## {{ .Title }}
27+
28+
{{ range .Commits -}}
29+
{{ if and (not (hasPrefix .Subject "changelog rebuild")) (not (hasPrefix .Subject "layer docs update")) (not (hasPrefix .Subject "bump version to")) -}}
30+
* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }}
31+
{{ end -}}
32+
{{ end }}
33+
{{ end -}}
34+
35+
{{- if .RevertCommits -}}
36+
## Reverts
37+
{{ range .RevertCommits -}}
38+
* {{ .Revert.Header }}
39+
{{ end }}
40+
{{ end -}}
41+
42+
{{- if .MergeCommits -}}
43+
## Pull Requests
44+
45+
{{ range .MergeCommits -}}
46+
* {{ .Header }}
47+
{{ end }}
48+
{{ end -}}
49+
50+
{{- if .NoteGroups -}}
51+
{{ range .NoteGroups -}}
52+
## {{ .Title }}
53+
{{ range .Notes }}
54+
{{ .Body }}
55+
{{ end }}
56+
{{ end -}}
57+
{{ end -}}
58+
{{ end -}}
59+
60+
{{- if .Versions }}
61+
[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD
62+
{{ range .Versions -}}
63+
{{ if .Tag.Previous -}}
64+
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
65+
{{ end -}}
66+
{{ end -}}
67+
{{ end -}}

.chglog/config.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
style: github
2+
template: CHANGELOG.tpl.md
3+
info:
4+
title: CHANGELOG
5+
repository_url: https://github.com/aws-powertools/powertools-lambda-java
6+
options:
7+
commits:
8+
filters:
9+
Type:
10+
- feat
11+
- fix
12+
- perf
13+
- refactor
14+
- docs
15+
- chore
16+
- revert
17+
commit_groups:
18+
title_maps:
19+
feat: Features
20+
fix: Bug Fixes
21+
perf: Performance Improvements
22+
refactor: Code Refactoring
23+
docs: Documentation
24+
chore: Maintenance
25+
revert: Regression
26+
header:
27+
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
28+
pattern_maps:
29+
- Type
30+
- Scope
31+
- Subject
32+
notes:
33+
keywords:
34+
- BREAKING CHANGE
35+
# issues:
36+
# prefix:
37+
# - #

0 commit comments

Comments
 (0)