diff --git a/.github/changlog_template.hbs b/.github/changlog_template.hbs index 7422e06..3cb92e0 100644 --- a/.github/changlog_template.hbs +++ b/.github/changlog_template.hbs @@ -1,20 +1,65 @@ {{#each releases}} {{#if @first}} - {{#commit-list commits heading='## 🚑 Fixs' message=':ambulance:|fix|bugfix|bug'}} - - {{subject}} [`{{shorthash}}`]({{href}}) + {{#commit-list commits heading='## 🚑 Fixs' message=':ambulance:'}} + - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "fix" "true"}} {{/commit-list}} + {{#unless @root.fix }} + {{#commit-list merges heading='## 🚑 Fixs' message=':ambulance:'}} + - {{message}} [`{{id}}`]({{href}}) `{{author}}` + {{/commit-list}} + {{/unless}} + {{#if @root.fix }} + {{#commit-list merges heading='' message=':ambulance:'}} + - {{message}} [`{{id}}`]({{href}}) `{{author}}` + {{/commit-list}} + {{/if}} - {{#commit-list commits heading='## 🔨 Changes' message=':hammer:|:arrow_up:|:heavy_plus_sign:'}} - - {{subject}} [`{{shorthash}}`]({{href}}) + + {{#commit-list commits heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}} + - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "change" "true"}} {{/commit-list}} + {{#unless @root.change }} + {{#commit-list merges heading='## 🔨 Changes' message=':hammer:|:heavy_plus_sign:'}} + - {{message}} [`{{id}}`]({{href}}) `{{author}}` + {{/commit-list}} + {{/unless}} + {{#if @root.change }} + {{#commit-list merges heading='' message=':hammer:|:heavy_plus_sign:'}} + - {{message}} [`{{id}}`]({{href}}) `{{author}}` + {{/commit-list}} + {{/if}} + {{#commit-list commits heading='## ✏ Enhancements' message=':pencil2:'}} - - {{subject}} [`{{shorthash}}`]({{href}}) + - {{subject}} [`{{shorthash}}`]({{href}}) {{setVar "enhanc" "true"}} {{/commit-list}} - {{#commit-list commits heading='## ⬆️ Dependency updates' message=':pencil2:'}} - - {{subject}} [`{{shorthash}}`]({{href}}) + {{#unless @root.enhanc }} + {{#commit-list merges heading='## ✏ Enhancements' message=':pencil2:'}} + - {{message}} [`{{id}}`]({{href}}) `{{author}}` + {{/commit-list}} + {{/unless}} + {{#if @root.enhanc }} + {{#commit-list merges heading='' message=':pencil2:'}} + - {{message}} [`{{id}}`]({{href}}) `{{author}}` + {{/commit-list}} + {{/if}} + + + + {{#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:'}} + - {{message}} [`{{id}}`]({{href}}) `{{author}}` + {{/commit-list}} + {{/unless}} + {{#if @root.dep }} + {{#commit-list merges heading='' message=':arrow_up:'}} + - {{message}} [`{{id}}`]({{href}}) `{{author}}` + {{/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