# Changelog

All notable changes to this project will be documented in this file.
{{!-- if need, set replaceText in config.json "#(\\d+)": "[#$1](https://github.com/hugo-fixit/FixIt/issues/$1)" --}}
{{!-- Based on https://github.com/cookpete/auto-changelog/blob/master/templates/conventional.hbs --}}

{{#each releases}}
  {{#if href}}
    ## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}}
  {{else}}
    ## {{title}}{{#if tag}} - {{isoDate}}{{/if}}
  {{/if}}

  {{#if summary}}
    {{summary}}
  {{/if}}

  {{!-- List commits with `Breaking change: ` somewhere in the message --}}
  {{#commit-list commits heading='### :boom: Breaking Changes' message='(:boom:|Breaking change:|BREAKING CHANGE:)'}}
  - {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
  {{/commit-list}}

  {{!-- List commits that add new features, but exclude those that have `:sparkles:` in the message --}}
  {{#commit-list commits heading='### :tada: New Features' message='(:tada:|Feat(new):|feat(new):)' exclude='^:sparkles:'}}
  - {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
  {{/commit-list}}

  {{!-- List commits that enhance existing features, but exclude those that have `:tada:` in the message --}}
  {{#commit-list commits heading='### :sparkles: Enhancements' message='(:sparkles:|Feat:|feat:|Perf:|perf:)' exclude='^:tada:'}}
  - {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
  {{/commit-list}}

  {{!-- List commits that bug fixes --}}
  {{#commit-list commits heading='### :bug: Bug Fixes' message='(:bug:|Fix:|fix:)'}}
  - {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
  {{/commit-list}}

  {{!-- List commits that improve the documentation --}}
  {{#commit-list commits heading='### :memo: Documentation' message='(:memo:|Docs:|docs:)'}}
  - {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
  {{/commit-list}}

  {{!-- List other changes commits --}}
  {{#commit-list commits heading='### :wrench: Other Changes' message='(Refactor:|refactor:|Style:|style:|Test:|test:)'}}
  - {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
  {{/commit-list}}

  {{!-- List dependencies updates --}}
  {{#commit-list commits heading='### :arrow_up: Dependencies Updates' message='(:arrow_up:|Chore:|chore:|Build:|build:)'}}
  - {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}}
  {{/commit-list}}
  
  {{#if merges}}
    ### Merged pull requests

    {{#each merges}}
      {{!-- {{#if href}}[`#{{id}}`]({{href}}){{/if}} --}}
      - {{#if commit.breaking}}**Breaking change:** {{/if}}{{message}} by {{githubUser author}} in {{#if id}}#{{id}}{{/if}}
    {{/each}}
  {{/if}}

  {{#if fixes}}
    ### Closed issues

    {{#each fixes}}
      - {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} {{#if id}}#{{id}}{{/if}}{{/each}} by {{githubUser commit.author}}
    {{/each}}
  {{/if}}

  {{#if href}}
    **Full Changelog**: {{ href}}
  {{else}}
    {{!-- TODO --}}
  {{/if}}

{{/each}}