diff --git a/3_transformer/transform.go b/3_transformer/transform.go index 853788cf..564bb863 100644 --- a/3_transformer/transform.go +++ b/3_transformer/transform.go @@ -29,6 +29,7 @@ type TemplateContext struct { Perf []*Commit Refactor []*Commit Test []*Commit + Style []*Commit Revert []*Commit BreakingChanges []*Commit Commits []*Commit @@ -119,6 +120,11 @@ func Transform(g *client.GitClient, splices []*extractor.ExtractSplice) ([]*Temp ctx.Test = make([]*Commit, 0) } ctx.Test = append(ctx.Test, c) + case "style": + if ctx.Style == nil { + ctx.Style = make([]*Commit, 0) + } + ctx.Style = append(ctx.Style, c) case "revert": if ctx.Revert == nil { ctx.Revert = make([]*Commit, 0) diff --git a/4_generator/template_full.go b/4_generator/template_full.go index fbe15c39..73480b09 100644 --- a/4_generator/template_full.go +++ b/4_generator/template_full.go @@ -53,6 +53,11 @@ const FULL_TEMPLATE = `# {{ .Version }} {{ template "body" .Docs }} {{- end -}} +{{if .Style}} +### 🌇 Style: +{{ template "body" .Style }} +{{- end -}} + {{if .Revert}} ### 🔙 Revert: {{range .Revert -}} diff --git a/repl/src/template/default.js b/repl/src/template/default.js index 2141ea1b..929b7a42 100644 --- a/repl/src/template/default.js +++ b/repl/src/template/default.js @@ -51,6 +51,11 @@ const TEMPLATE_DEFAULT = `# {{ .Version }} {{ template "body" .Docs }} {{- end -}} +{{if .Style}} +### 🌇 Style: +{{ template "body" .Style }} +{{- end -}} + {{if .Revert}} ### 🔙 Revert: {{range .Revert -}}