From 9cd44b7be9853a48956a5d337c24fe58fa269fb5 Mon Sep 17 00:00:00 2001 From: exequielrafaela Date: Fri, 15 May 2020 12:06:10 -0300 Subject: [PATCH] BBL-275 Adding changelog config files --- .chglog/CHANGELOG.tpl.md | 111 +++++++++++++++++++++++++++++++++++++++ .chglog/config.yml | 13 +++++ 2 files changed, 124 insertions(+) create mode 100755 .chglog/CHANGELOG.tpl.md create mode 100755 .chglog/config.yml diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 00000000..687d7023 --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,111 @@ +# Change Log + +All notable changes to this project will be documented in this file. + +{{ if .Versions -}} + +## [Unreleased] +{{ if .Unreleased.CommitGroups -}} +{{ range .Unreleased.CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +{{/* SKIPPING RULES - START */ -}} +{{- if not (hasPrefix .Subject "Updated CHANGELOG") -}} +{{- if not (contains .Subject "[ci skip]") -}} +{{- if not (contains .Subject "[skip ci]") -}} +{{- if not (hasPrefix .Subject "Merge pull request ") -}} +{{- if not (hasPrefix .Subject "Added CHANGELOG") -}} +{{- /* SKIPPING RULES - END */ -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{/* SKIPPING RULES - START */ -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{/* SKIPPING RULES - END */ -}} +{{ end }} +{{ end -}} +{{ else }} +{{ range .Unreleased.Commits -}} +{{/* SKIPPING RULES - START */ -}} +{{- if not (hasPrefix .Subject "Updated CHANGELOG") -}} +{{- if not (contains .Subject "[ci skip]") -}} +{{- if not (contains .Subject "[skip ci]") -}} +{{- if not (hasPrefix .Subject "Merge pull request ") -}} +{{- if not (hasPrefix .Subject "Added CHANGELOG") -}} +{{- /* SKIPPING RULES - END */ -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{/* SKIPPING RULES - START */ -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{/* SKIPPING RULES - END */ -}} +{{ end }} +{{ end -}} +{{ end -}} + +{{ range .Versions }} + +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} +{{ if .CommitGroups -}} +{{ range .CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +{{/* SKIPPING RULES - START */ -}} +{{- if not (hasPrefix .Subject "Updated CHANGELOG") -}} +{{- if not (contains .Subject "[ci skip]") -}} +{{- if not (contains .Subject "[skip ci]") -}} +{{- if not (hasPrefix .Subject "Merge pull request ") -}} +{{- if not (hasPrefix .Subject "Added CHANGELOG") -}} +{{- /* SKIPPING RULES - END */ -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{/* SKIPPING RULES - START */ -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{/* SKIPPING RULES - END */ -}} +{{ end }} +{{ end -}} +{{ else }} +{{ range .Commits -}} +{{/* SKIPPING RULES - START */ -}} +{{- if not (hasPrefix .Subject "Updated CHANGELOG") -}} +{{- if not (contains .Subject "[ci skip]") -}} +{{- if not (contains .Subject "[skip ci]") -}} +{{- if not (hasPrefix .Subject "Merge pull request ") -}} +{{- if not (hasPrefix .Subject "Added CHANGELOG") -}} +{{- /* SKIPPING RULES - END */ -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{/* SKIPPING RULES - START */ -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{ end -}} +{{/* SKIPPING RULES - END */ -}} +{{ end }} +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{- if .Versions }} +[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD +{{ range .Versions -}} +{{ if .Tag.Previous -}} +[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} +{{ end -}} +{{ end -}} +{{ end -}} diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 00000000..56e974a5 --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,13 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://github.com/binbashar/terraform-aws-certbot-lambda +options: + header: + pattern: "^(.*)$" + pattern_maps: + - Subject + notes: + keywords: + - BREAKING CHANGE