imgup 4.0.0

Upload images via APIs
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration

[git]
conventional_commits     = true            # Parse commits based on https://www.conventionalcommits.org
filter_unconventional    = true            # Exclude non-conventional commits
split_commits            = false           # Treat each line in a commit as a separate entry
filter_commits           = false           # Only include commits matched by `commit_parsers`
protect_breaking_commits = true            # Keep breaking-change commits from being skipped
sort_commits             = "newest"        # Order inside sections
tag_pattern              = "v[0-9].*"
ignore_tags              = "rc|beta|alpha" # Ignored tags' commits roll into the next release
skip_tags                = ""
topo_order               = false

commit_preprocessors = [
  # Link merge request numbers
  { pattern = '\((\w+\s)?[!#]([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))" },
  # Collapse repeated spaces
  { pattern = "  +", replace = " " },
]

commit_parsers = [
  { message = "^(ci|build|chore)\\(deps.*\\)", skip = true },
  { message = "^chore\\(release\\)", skip = true },
  { message = "^fix\\(deps.*\\): update dependency ([^\\s]+)", scope = "${1}", group = "<!-- 8 -->Dependencies" },
  { message = "^fix\\(deps.*\\)", group = "<!-- 8 -->Dependencies" },
  { message = "^feat", group = "<!-- 0 -->Features" },
  { message = "^fix", group = "<!-- 1 -->Bug fixes" },
  { message = "^refactor", group = "<!-- 2 -->Refactor" },
  { message = "^doc", group = "<!-- 3 -->Documentation" },
  { message = "^perf", group = "<!-- 32 -->Performance" },
  { message = "^build", group = "<!-- 4 -->Build" },
  { body = ".*security", group = "<!-- 5 -->Security" },
  { message = "^test", group = "<!-- 6 -->Testing" },
  { message = "^style", group = "<!-- 62 -->Styling" },
  { message = "^(ci|chore)", group = "<!-- 7 -->Chores" },
  { message = "^revert", group = "<!-- 9 -->Revert" },
]

[changelog]
postprocessors = [{ pattern = '<REPO>', replace = "https://github.com/deadnews/imgup" }]
header = """
# Changelog\n
"""
body = """
{%- macro print_commit(commit) -%}
    - {% if commit.scope %}_({{ commit.scope }})_ {% endif %}{% if commit.breaking %}[**breaking**] {% endif %}\
    {{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }}))
{%- endmacro -%}

{%- macro print_deps_commit(commit) -%}
    - {{ commit.message }} - ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }}))
{%- endmacro -%}

{%- if version -%}
    {%- if previous.version -%}
        ## [{{ version | trim_start_matches(pat="v") }}]\
        (<REPO>/compare/{{ previous.version }}...{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
    {%- else -%}
        ## [{{ version | trim_start_matches(pat="v") }}]\
        (<REPO>/commits/{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
    {%- endif -%}
{%- else -%}
    ## [unreleased]
{%- endif %}

{%- for group, commits in commits | group_by(attribute="group") %}

    ### {{ group | striptags | trim | upper_first }}
    {% if group | striptags | trim | lower == "dependencies" -%}
        {%- for scope, scoped_commits in commits | filter(attribute="scope") | group_by(attribute="scope") %}
            {{ self::print_deps_commit(commit=scoped_commits | first) }}
        {%- endfor -%}
        {%- for commit in commits -%}
            {%- if not commit.scope %}
                {{ self::print_deps_commit(commit=commit) }}
            {%- endif -%}
        {%- endfor -%}
    {%- else -%}
        {%- for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
            {{ self::print_commit(commit=commit) }}
        {%- endfor -%}
        {%- for commit in commits -%}
            {%- if not commit.scope %}
                {{ self::print_commit(commit=commit) }}
            {%- endif -%}
        {%- endfor -%}
    {%- endif -%}
{%- endfor -%}
{% raw %}\n
{% endraw %}
"""
footer = """
<!-- generated by git-cliff -->
"""
trim = true