-
Notifications
You must be signed in to change notification settings - Fork 160
/
Copy pathchangelog.tmpl
72 lines (58 loc) · 1.49 KB
/
changelog.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{{- $announcements := newStringList -}}
{{- $breaking := newStringList -}}
{{- $features := newStringList -}}
{{- $changes := newStringList -}}
{{- $fixes := newStringList -}}
{{- $other := newStringList -}}
{{- range . -}}
{{if has "announcement" .Labels -}}
{{$features = append $announcements (renderReleaseNote .) -}}
{{else if .BreakingChange -}}
{{$breaking = append $breaking (renderReleaseNote .) -}}
{{else if has "feature" .Labels -}}
{{$features = append $features (renderReleaseNote .) -}}
{{else if has "change" .Labels -}}
{{$fixes = append $changes (renderReleaseNote .) -}}
{{else if has "fix" .Labels -}}
{{$fixes = append $fixes (renderReleaseNote .) -}}
{{else -}}
{{$other = append $other (renderReleaseNote .) -}}
{{end -}}
{{- end -}}
{{- if gt (len $announcements) 0 -}}
{{range $announcements | sortAlpha -}}
{{. }}
{{end -}}
{{- end -}}
**Docker Image**: `{{ expandenv "$REGISTRY/$IMAGE_NAME:$GITHUB_REF_NAME" }}`
### Changelog
{{- if gt (len $breaking) 0}}
**Breaking Changes**:
{{range $breaking | sortAlpha -}}
* {{. }}
{{end -}}
{{- end -}}
{{- if gt (len $features) 0}}
**Features**:
{{range $features | sortAlpha -}}
* {{. }}
{{end -}}
{{- end -}}
{{- if gt (len $changes) 0}}
**Changes**:
{{range $changes | sortAlpha -}}
* {{. }}
{{end -}}
{{- end -}}
{{- if gt (len $fixes) 0}}
**Fixes**:
{{range $fixes | sortAlpha -}}
* {{. }}
{{end -}}
{{- end -}}
{{- if gt (len $other) 0}}
**Internal/Other**:
{{range $other | sortAlpha -}}
* {{. }}
{{end -}}
{{- end -}}