forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchangelog.tmpl
67 lines (67 loc) · 1.78 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
{{- $notes := newStringList -}}
{{- $unknown := newStringList -}}
{{- $breaking := newStringList -}}
{{- $deprecations := newStringList -}}
{{- $features := newStringList -}}
{{- $improvements := newStringList -}}
{{- $bugs := newStringList -}}
{{- range . -}}
{{if eq "note" .Type -}}
{{$notes = append $notes (renderReleaseNote .) -}}
{{else if eq "breaking-change" .Type -}}
{{$breaking = append $breaking (renderReleaseNote .) -}}
{{else if eq "deprecation" .Type -}}
{{$deprecations = append $deprecations (renderReleaseNote .) -}}
{{else if or (eq "new-resource" .Type) (eq "new-datasource" .Type) (eq "feature" .Type) -}}
{{$features = append $features (renderReleaseNote .) -}}
{{else if or (eq "improvement" .Type) (eq "enhancement" .Type) -}}
{{$improvements = append $improvements (renderReleaseNote .) -}}
{{ else if eq "bug" .Type -}}
{{$bugs = append $bugs (renderReleaseNote .) -}}
{{ else if eq "none" .Type -}}
{{ else -}}
{{$unknown = append $unknown (renderReleaseNote .) -}}
{{end -}}
{{- end -}}
{{- if gt (len $unknown) 0 -}}
UNKNOWN CHANGELOG TYPE:
{{range $unknown | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $notes) 0 -}}
NOTES:
{{range $notes | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $deprecations) 0 -}}
DEPRECATIONS:
{{range $deprecations | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- 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 $improvements) 0}}
IMPROVEMENTS:
{{range $improvements | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}
{{- if gt (len $bugs) 0}}
BUG FIXES:
{{range $bugs | sortAlpha -}}
* {{. }}
{{- end -}}
{{- end -}}