tx 0.0.1

tmux with s keystrokes
Documentation
[changelog]
trim = true

postprocessors = [
  { pattern = '\$REPO', replace = "https://github.com/noirbizarre/tx" },
]

header = """
# Changelog\n
The format is inspired by the latest version of [Keep a Changelog](https://keepachangelog.com/en), \
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), \
and generated by levaraging [conventional commits](https://www.conventionalcommits.org/).
"""


body = """

{% if version -%}
    ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else -%}
    ## [Unreleased]
{% endif -%}

{% macro print_commit(commit) -%}
    - {% if commit.breaking %}[**breaking**] {% endif %}\
      {{ commit.message | upper_first }} - \
      ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) - {{ commit.author.name }}
{% endmacro -%}

{% for group, commits in commits | group_by(attribute="group") %}
    ### {{ group | upper_first }}
    {% for commit in commits -%}
        {% if not commit.scope %}
            {{ self::print_commit(commit=commit) }}
        {%- endif %}
    {%- endfor -%}
    {% for group, commits in commits | group_by(attribute="scope") %}
        #### {{ group | upper_first }}
        {% for commit in commits %}
            {{ self::print_commit(commit=commit) }}
        {%- endfor -%}
    {% endfor -%}\
{% endfor %}
"""


footer = """
"""

[git]
conventional_commits = true
filter_commits = true
filter_unconventional = true
protect_breaking_commits = true
sort_commits = "oldest"
tag_pattern = "[0-9]+.[0-9]+.[0-9]+"

commit_parsers = [
  { message = "^doc", group = "Documented" },
  { message = "^feat", group = "Added" },
  { message = "^fix", group = "Fixed" },
  { message = "^perf", group = "Improved" },
  { message = "^revert", group = "Removed" },

  # Will be shown if they include breaking changes:
  { message = "^build", group = "Continuous Deployment", skip = true },
  { message = "^chore", group = "Miscellaneous", skip = true },
  { message = "^ci", group = "Continuous Integration", skip = true },
  { message = "^refactor", group = "Refactoring", skip = true },
  { message = "^style", group = "Style", skip = true },
  { message = "^test", group = "Test", skip = true },
]
commit_preprocessors = [
  { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/noirbizarre/tx/issues/${2}))" },
]