From b89dee4aa8d5c2da7aa4f8cc8379ea160f1ee40a Mon Sep 17 00:00:00 2001 From: SebClem Date: Tue, 23 Mar 2021 15:40:40 +0100 Subject: [PATCH 1/7] :pencil2: Fix changelog --- .github/changlog_template.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/changlog_template.hbs b/.github/changlog_template.hbs index 7422e06..b0adeaa 100644 --- a/.github/changlog_template.hbs +++ b/.github/changlog_template.hbs @@ -13,7 +13,7 @@ {{#commit-list commits heading='## ✏ Enhancements' message=':pencil2:'}} - {{subject}} [`{{shorthash}}`]({{href}}) {{/commit-list}} - {{#commit-list commits heading='## ⬆️ Dependency updates' message=':pencil2:'}} + {{#commit-list commits heading='## ⬆️ Dependency updates' message=':arrow_up:'}} - {{subject}} [`{{shorthash}}`]({{href}}) {{/commit-list}} {{/if}} From 32296d898fad6efe1192b15967bc3aabc6c2b593 Mon Sep 17 00:00:00 2001 From: SebClem Date: Tue, 23 Mar 2021 16:29:42 +0100 Subject: [PATCH 2/7] :pencil2: Fix changelog --- .github/changlog_template.hbs | 49 +++++++++++++++++++++++++++++++++++ .github/custom-handlebars.js | 5 ++++ .release-it.yml | 2 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/custom-handlebars.js diff --git a/.github/changlog_template.hbs b/.github/changlog_template.hbs index b0adeaa..379f163 100644 --- a/.github/changlog_template.hbs +++ b/.github/changlog_template.hbs @@ -1,20 +1,69 @@ {{#each releases}} {{#if @first}} {{#commit-list commits heading='## 🚑 Fixs' message=':ambulance:|fix|bugfix|bug'}} + {{setVar "fix" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{/commit-list}} + {{#unless @root.fix }} + {{#commit-list merges heading='## 🚑 Fixs' message=':ambulance:|fix|bugfix|bug'}} + - {{message}} [`{{id}}`]({{href}}) + {{/commit-list}} + {{/unless}} + {{#if @root.fix }} + {{#commit-list merges heading='' message=':ambulance:|fix|bugfix|bug'}} + - {{message}} [`{{id}}`]({{href}}) + {{/commit-list}} + {{/if}} + {{#commit-list commits heading='## 🔨 Changes' message=':hammer:|:arrow_up:|:heavy_plus_sign:'}} + {{setVar "change" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{/commit-list}} + {{#unless @root.change }} + {{#commit-list merges heading='## 🔨 Changes' message=':hammer:|:arrow_up:|:heavy_plus_sign:'}} + - {{message}} [`{{id}}`]({{href}}) + {{/commit-list}} + {{/unless}} + {{#if @root.change }} + {{#commit-list merges heading='' message=':hammer:|:arrow_up:|:heavy_plus_sign:'}} + - {{message}} [`{{id}}`]({{href}}) + {{/commit-list}} + {{/if}} + {{#commit-list commits heading='## ✏ Enhancements' message=':pencil2:'}} + {{setVar "enhanc" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{/commit-list}} + {{#unless @root.enhanc }} + {{#commit-list merges heading='## ✏ Enhancements' message=':pencil2:'}} + - {{message}} [`{{id}}`]({{href}}) + {{/commit-list}} + {{/unless}} + {{#if @root.enhanc }} + {{#commit-list merges heading='' message=':pencil2:'}} + - {{message}} [`{{id}}`]({{href}}) + {{/commit-list}} + {{/if}} + + + {{#commit-list commits heading='## ⬆️ Dependency updates' message=':arrow_up:'}} + {{setVar "dep" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{/commit-list}} + {{#unless @root.dep }} + {{#commit-list merges heading='## ⬆️ Dependency updates' message=':arrow_up:'}} + - {{message}} [`{{id}}`]({{href}}) + {{/commit-list}} + {{/unless}} + {{#if @root.dep }} + {{#commit-list merges heading='' message=':arrow_up:'}} + - {{message}} [`{{id}}`]({{href}}) + {{/commit-list}} + {{/if}} {{/if}} {{/each}} \ No newline at end of file diff --git a/.github/custom-handlebars.js b/.github/custom-handlebars.js new file mode 100644 index 0000000..51a1356 --- /dev/null +++ b/.github/custom-handlebars.js @@ -0,0 +1,5 @@ +module.exports = function (Handlebars) { + Handlebars.registerHelper("setVar", function(varName, varValue, options) { + options.data.root[varName] = varValue; + }); +} \ No newline at end of file diff --git a/.release-it.yml b/.release-it.yml index 5664d0a..f189bae 100644 --- a/.release-it.yml +++ b/.release-it.yml @@ -5,7 +5,7 @@ github: git: - changelog: "auto-changelog --stdout" + changelog: "auto-changelog --stdout --handlebars-setup .github/custom-handlebars.js" push: false tag: false commit: false From 4ad3099a1b3f04ac8668bc126250bf89817f9224 Mon Sep 17 00:00:00 2001 From: SebClem Date: Tue, 23 Mar 2021 16:32:53 +0100 Subject: [PATCH 3/7] :pencil2: Fix matching in changelog --- .github/changlog_template.hbs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/changlog_template.hbs b/.github/changlog_template.hbs index 379f163..d92682f 100644 --- a/.github/changlog_template.hbs +++ b/.github/changlog_template.hbs @@ -1,33 +1,33 @@ {{#each releases}} {{#if @first}} - {{#commit-list commits heading='## 🚑 Fixs' message=':ambulance:|fix|bugfix|bug'}} + {{#commit-list commits heading='## 🚑 Fixs' message=':ambulance:'}} {{setVar "fix" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{/commit-list}} {{#unless @root.fix }} - {{#commit-list merges heading='## 🚑 Fixs' message=':ambulance:|fix|bugfix|bug'}} + {{#commit-list merges heading='## 🚑 Fixs' message=':ambulance:'}} - {{message}} [`{{id}}`]({{href}}) {{/commit-list}} {{/unless}} {{#if @root.fix }} - {{#commit-list merges heading='' message=':ambulance:|fix|bugfix|bug'}} + {{#commit-list merges heading='' message=':ambulance:'}} - {{message}} [`{{id}}`]({{href}}) {{/commit-list}} {{/if}} - {{#commit-list commits heading='## 🔨 Changes' message=':hammer:|:arrow_up:|:heavy_plus_sign:'}} + {{#commit-list commits heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}} {{setVar "change" "true"}} - {{subject}} [`{{shorthash}}`]({{href}}) {{/commit-list}} {{#unless @root.change }} - {{#commit-list merges heading='## 🔨 Changes' message=':hammer:|:arrow_up:|:heavy_plus_sign:'}} + {{#commit-list merges heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}} - {{message}} [`{{id}}`]({{href}}) {{/commit-list}} {{/unless}} {{#if @root.change }} - {{#commit-list merges heading='' message=':hammer:|:arrow_up:|:heavy_plus_sign:'}} + {{#commit-list merges heading='' message=':hammer:|:heavy_plus_sign:'}} - {{message}} [`{{id}}`]({{href}}) {{/commit-list}} {{/if}} From c90a615c0c64f6e2a90f12a120ea4907dda1c674 Mon Sep 17 00:00:00 2001 From: SebClem Date: Tue, 23 Mar 2021 16:38:37 +0100 Subject: [PATCH 4/7] :pencil2: Add author for merge in changelog --- .github/changlog_template.hbs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/changlog_template.hbs b/.github/changlog_template.hbs index d92682f..48ae37f 100644 --- a/.github/changlog_template.hbs +++ b/.github/changlog_template.hbs @@ -6,12 +6,12 @@ {{/commit-list}} {{#unless @root.fix }} {{#commit-list merges heading='## 🚑 Fixs' message=':ambulance:'}} - - {{message}} [`{{id}}`]({{href}}) + - {{message}} [`{{id}}`]({{href}}) `{{author}}` {{/commit-list}} {{/unless}} {{#if @root.fix }} {{#commit-list merges heading='' message=':ambulance:'}} - - {{message}} [`{{id}}`]({{href}}) + - {{message}} [`{{id}}`]({{href}}) `{{author}}` {{/commit-list}} {{/if}} @@ -23,12 +23,12 @@ {{/commit-list}} {{#unless @root.change }} {{#commit-list merges heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}} - - {{message}} [`{{id}}`]({{href}}) + - {{message}} [`{{id}}`]({{href}}) `{{author}}` {{/commit-list}} {{/unless}} {{#if @root.change }} {{#commit-list merges heading='' message=':hammer:|:heavy_plus_sign:'}} - - {{message}} [`{{id}}`]({{href}}) + - {{message}} [`{{id}}`]({{href}}) `{{author}}` {{/commit-list}} {{/if}} @@ -40,12 +40,12 @@ {{/commit-list}} {{#unless @root.enhanc }} {{#commit-list merges heading='## ✏ Enhancements' message=':pencil2:'}} - - {{message}} [`{{id}}`]({{href}}) + - {{message}} [`{{id}}`]({{href}}) `{{author}}` {{/commit-list}} {{/unless}} {{#if @root.enhanc }} {{#commit-list merges heading='' message=':pencil2:'}} - - {{message}} [`{{id}}`]({{href}}) + - {{message}} [`{{id}}`]({{href}}) `{{author}}` {{/commit-list}} {{/if}} @@ -57,12 +57,12 @@ {{/commit-list}} {{#unless @root.dep }} {{#commit-list merges heading='## ⬆️ Dependency updates' message=':arrow_up:'}} - - {{message}} [`{{id}}`]({{href}}) + - {{message}} [`{{id}}`]({{href}}) `{{author}}` {{/commit-list}} {{/unless}} {{#if @root.dep }} {{#commit-list merges heading='' message=':arrow_up:'}} - - {{message}} [`{{id}}`]({{href}}) + - {{message}} [`{{id}}`]({{href}}) `{{author}}` {{/commit-list}} {{/if}} {{/if}} From 6530c795878b66beda65df92bed86e72b9a95e0a Mon Sep 17 00:00:00 2001 From: SebClem Date: Tue, 23 Mar 2021 16:40:59 +0100 Subject: [PATCH 5/7] :pencil2: Remove space in changelog --- .github/changlog_template.hbs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/changlog_template.hbs b/.github/changlog_template.hbs index 48ae37f..d64ca36 100644 --- a/.github/changlog_template.hbs +++ b/.github/changlog_template.hbs @@ -1,8 +1,7 @@ {{#each releases}} {{#if @first}} {{#commit-list commits heading='## 🚑 Fixs' message=':ambulance:'}} - {{setVar "fix" "true"}} - - {{subject}} [`{{shorthash}}`]({{href}}) + - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "fix" "true"}} {{/commit-list}} {{#unless @root.fix }} {{#commit-list merges heading='## 🚑 Fixs' message=':ambulance:'}} @@ -18,8 +17,7 @@ {{#commit-list commits heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}} - {{setVar "change" "true"}} - - {{subject}} [`{{shorthash}}`]({{href}}) + - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "change" "true"}} {{/commit-list}} {{#unless @root.change }} {{#commit-list merges heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}} @@ -35,8 +33,7 @@ {{#commit-list commits heading='## ✏ Enhancements' message=':pencil2:'}} - {{setVar "enhanc" "true"}} - - {{subject}} [`{{shorthash}}`]({{href}}) + - {{subject}} [`{{shorthash}}`]({{href}} {{setVar "enhanc" "true"}} {{/commit-list}} {{#unless @root.enhanc }} {{#commit-list merges heading='## ✏ Enhancements' message=':pencil2:'}} @@ -51,9 +48,8 @@ - {{#commit-list commits heading='## ⬆️ Dependency updates' message=':arrow_up:'}} - {{setVar "dep" "true"}} - - {{subject}} [`{{shorthash}}`]({{href}}) + {{#commit-list commits heading='## ⬆️ Dependency updates' message=':arrow_up:'} + - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "dep" "true"}} {{/commit-list}} {{#unless @root.dep }} {{#commit-list merges heading='## ⬆️ Dependency updates' message=':arrow_up:'}} From 676070e07271d3a2e7f1dd3f4322fbe3b69d42a3 Mon Sep 17 00:00:00 2001 From: SebClem Date: Tue, 23 Mar 2021 16:46:32 +0100 Subject: [PATCH 6/7] :pencil2: Fix changelog --- .github/changlog_template.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/changlog_template.hbs b/.github/changlog_template.hbs index d64ca36..3ed8c3f 100644 --- a/.github/changlog_template.hbs +++ b/.github/changlog_template.hbs @@ -48,7 +48,7 @@ - {{#commit-list commits heading='## ⬆️ Dependency updates' message=':arrow_up:'} + {{#commit-list commits heading='## ⬆️ Dependency updates' message=':arrow_up:'}} - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "dep" "true"}} {{/commit-list}} {{#unless @root.dep }} From 5d106fced379dbe3021f08dc666b3e99af7967e3 Mon Sep 17 00:00:00 2001 From: SebClem Date: Tue, 23 Mar 2021 16:47:48 +0100 Subject: [PATCH 7/7] :pencil2: Fix changelog --- .github/changlog_template.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/changlog_template.hbs b/.github/changlog_template.hbs index 3ed8c3f..3cb92e0 100644 --- a/.github/changlog_template.hbs +++ b/.github/changlog_template.hbs @@ -33,7 +33,7 @@ {{#commit-list commits heading='## ✏ Enhancements' message=':pencil2:'}} - - {{subject}} [`{{shorthash}}`]({{href}} {{setVar "enhanc" "true"}} + - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "enhanc" "true"}} {{/commit-list}} {{#unless @root.enhanc }} {{#commit-list merges heading='## ✏ Enhancements' message=':pencil2:'}}