Skip to content

Commit

Permalink
Add changelog template
Browse files Browse the repository at this point in the history
  • Loading branch information
Nmishin committed Jan 22, 2024
1 parent e6ef317 commit 6014d39
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions scripts/changelog.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{- if index .NotesByType "upgrade-guide" }}
{{range index .NotesByType "upgrade-guide" -}}
{{ template "note" .}}
{{ end -}}
{{- end -}}

{{- if index .NotesByType "breaking-change" }}
BREAKING CHANGES:

{{range index .NotesByType "breaking-change" -}}
{{ template "note" .}}
{{ end -}}
{{- end -}}

{{- if .NotesByType.note }}
NOTES:

{{range .NotesByType.note -}}
{{ template "note" .}}
{{ end -}}
{{- end -}}

{{- $features := combineTypes .NotesByType.feature (index .NotesByType "new-resource" ) (index .NotesByType "new-data-source") (index .NotesByType "new-guide") }}
{{- if $features }}
FEATURES:

{{range $features | sort -}}
{{ template "note" . }}
{{ end -}}
{{- end -}}

{{- if .NotesByType.enhancement }}
ENHANCEMENTS:

{{range .NotesByType.enhancement | sort -}}
{{ template "note" .}}
{{ end -}}
{{- end -}}

{{- if .NotesByType.bug }}
BUG FIXES:

{{range .NotesByType.bug | sort -}}
{{ template "note" . }}
{{ end -}}
{{- end -}}

{{- if .NotesByType.internal }}
INTERNAL:

{{range .NotesByType.internal | sort -}}
{{ template "note" . }}
{{ end -}}
{{- end -}}

{{- if .NotesByType.dependency }}
DEPENDENCIES:

{{range .NotesByType.dependency | sort -}}
{{ template "note" . }}
{{ end -}}
{{- end -}}

0 comments on commit 6014d39

Please sign in to comment.