summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2022-09-16 11:25:14 +0200
committerMatthias Beyer <mail@beyermatthias.de>2022-09-16 11:33:04 +0200
commitf376c3285b224ae6627863d36f3a2d77180da9d8 (patch)
tree9e1bf281dadbb8840b0445fb6baf82f52f1d32de /assets
parent544f1e7d5b0d4bbd879c1ff6e9d0bfdea17921c7 (diff)
Add required header field "type"
And let the template render grouped by the type of an fragment. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'assets')
-rw-r--r--assets/default_config.toml7
-rw-r--r--assets/default_template.handlebars.md9
2 files changed, 13 insertions, 3 deletions
diff --git a/assets/default_config.toml b/assets/default_config.toml
index 55caa0f..8e6b80a 100644
--- a/assets/default_config.toml
+++ b/assets/default_config.toml
@@ -118,3 +118,10 @@ required = true
#value = "scripts/fetch_issue_number.sh"
#value = "some command to execute with arguments"
+# A header field named "type"
+# With three possible values: "Bugfix", "Feature" or "Misc"
+# which is required
+[header_fields.type]
+type = [ "Bugfix", "Feature", "Misc" ]
+required = true
+
diff --git a/assets/default_template.handlebars.md b/assets/default_template.handlebars.md
index 8cb9ade..583bf0a 100644
--- a/assets/default_template.handlebars.md
+++ b/assets/default_template.handlebars.md
@@ -6,11 +6,14 @@
{{#each (reverse (sort_versions this.versions))}}
## v{{this.version}}
-{{#each this.entries}}
-### (#{{this.header.issue}}) {{this.header.subject}}
+{{#each (group_by_header this.entries "type")}}
+### {{ @key }}
-{{this.text}}
+{{#each this}}
+#### (#{{this.header.issue}}) {{this.header.subject}}
+{{this.text}}
+{{/each}}
{{/each}}
{{/each}}