From 31a7299d70fd5b7f56ee5a0c5a7754383296918e Mon Sep 17 00:00:00 2001 From: Hans Hasselberg Date: Thu, 6 Aug 2020 23:15:29 +0200 Subject: [PATCH] Introducing changelog-gen (#8387) * add templates for changelog-gen * add entry files for currently unreleased PRs on master --- .changelog/changelog.tmpl | 40 +++++++++++++++++++++++++++++++++++++++ .changelog/note.tmpl | 3 +++ 2 files changed, 43 insertions(+) create mode 100644 .changelog/changelog.tmpl create mode 100644 .changelog/note.tmpl diff --git a/.changelog/changelog.tmpl b/.changelog/changelog.tmpl new file mode 100644 index 000000000000..fbdc8010ce4f --- /dev/null +++ b/.changelog/changelog.tmpl @@ -0,0 +1,40 @@ +{{- if index .NotesByType "breaking-change" -}} +BREAKING CHANGES: + +{{range index .NotesByType "breaking-change" -}} +* {{ template "note" .}} +{{ end -}} +{{- end -}} + +{{- if .NotesByType.security }} +SECURITY: + +{{range .NotesByType.security -}} +* {{ template "note" . }} +{{ end -}} +{{- end -}} + +{{- if .NotesByType.feature -}} +FEATURES: + +{{range .NotesByType.feature -}} +* {{ template "note" . }} +{{ end -}} +{{- end -}} + +{{- if .NotesByType.improvement }} +IMPROVEMENTS: + +{{range .NotesByType.improvement -}} +* {{ template "note" . }} +{{ end -}} +{{- end -}} + +{{- if .NotesByType.bug }} +BUG FIXES: + +{{range .NotesByType.bug -}} +* {{ template "note" . }} +{{ end -}} +{{- end -}} + diff --git a/.changelog/note.tmpl b/.changelog/note.tmpl new file mode 100644 index 000000000000..b9427f43f0c0 --- /dev/null +++ b/.changelog/note.tmpl @@ -0,0 +1,3 @@ +{{- define "note" -}} +{{.Body}} [[GH-{{- .Issue -}}](https://github.com/hashicorp/consul/pull/{{- .Issue -}})] +{{- end -}}