Skip to content

Commit

Permalink
Introducing changelog-gen (#8387)
Browse files Browse the repository at this point in the history
* add templates for changelog-gen
* add entry files for currently unreleased PRs on master
  • Loading branch information
hanshasselberg authored and mikemorris committed Sep 10, 2020
1 parent e04c98f commit 31a7299
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .changelog/changelog.tmpl
Original file line number Diff line number Diff line change
@@ -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 -}}

3 changes: 3 additions & 0 deletions .changelog/note.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- define "note" -}}
{{.Body}} [[GH-{{- .Issue -}}](https://github.com/hashicorp/consul/pull/{{- .Issue -}})]
{{- end -}}

0 comments on commit 31a7299

Please sign in to comment.