Files
wrkflw/cliff.toml

106 lines
3.6 KiB
TOML
Raw Normal View History

2025-04-21 17:13:33 +05:30
[changelog]
# The header of the changelog
header = """
# Changelog
All notable changes to wrkflw will be documented in this file.
"""
# Template for the changelog body
body = """
2025-04-30 17:52:18 +05:30
{%- macro remote_url() -%}
2025-04-30 17:57:29 +05:30
https://github.com/bahdotsh/wrkflw
2025-04-30 17:52:18 +05:30
{%- endmacro -%}
{% macro print_commit(commit) -%}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }} - \
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\
{% endmacro -%}
{% if version %}\
{% if previous.version %}\
## [{{ version | trim_start_matches(pat="v") }}]\
({{ self::remote_url() }}/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% endif %}\
{% else %}\
## [unreleased]
{% endif %}\
2025-04-21 17:13:33 +05:30
{% for group, commits in commits | group_by(attribute="group") %}
2025-04-30 17:52:18 +05:30
### {{ group | striptags | trim | upper_first }}
{% 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 -%}
{% endfor -%}
{%- if github -%}
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
## New Contributors ❤️
{% endif %}\
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
* @{{ contributor.username }} made their first contribution
{%- if contributor.pr_number %} in \
[#{{ contributor.pr_number }}]({{ self::remote_url() }}/pull/{{ contributor.pr_number }}) \
{%- endif %}
{%- endfor -%}
{%- endif %}
2025-04-21 17:13:33 +05:30
"""
# Remove the leading and trailing whitespace from the template
trim = true
# The footer of the changelog
footer = """
<!-- generated by git-cliff -->
"""
# This determines how the links to commits are formatted
[git]
conventional_commits = true
filter_unconventional = true
commit_parsers = [
2025-04-30 17:52:18 +05:30
{ message = "^feat", group = "<!-- 0 -->⛰️ Features" },
{ message = "^fix", group = "<!-- 1 -->🐛 Bug Fixes" },
{ message = "^doc", group = "<!-- 3 -->📚 Documentation" },
{ message = "^perf", group = "<!-- 4 -->⚡ Performance" },
{ message = "^refactor\\(clippy\\)", skip = true },
{ message = "^refactor", group = "<!-- 2 -->🚜 Refactor" },
{ message = "^style", group = "<!-- 5 -->🎨 Styling" },
{ message = "^test", group = "<!-- 6 -->🧪 Testing" },
{ message = "^chore\\(release\\): prepare for", skip = true },
{ message = "^chore\\(deps.*\\)", skip = true },
{ message = "^chore\\(pr\\)", skip = true },
{ message = "^chore\\(pull\\)", skip = true },
{ message = "^chore\\(npm\\).*yarn\\.lock", skip = true },
{ message = "^chore|^ci", group = "<!-- 7 -->⚙️ Miscellaneous Tasks" },
{ body = ".*security", group = "<!-- 8 -->🛡️ Security" },
{ message = "^revert", group = "<!-- 9 -->◀️ Revert" },
2025-04-21 17:13:33 +05:30
]
2025-04-21 18:32:51 +05:30
# Define the GitHub repository URL for commit links
[git.link]
# Format: https://github.com/USER/REPO/commit/{}
commit_link = "https://github.com/bahdotsh/wrkflw/commit/{}"
2025-04-21 18:32:51 +05:30
2025-04-21 17:13:33 +05:30
# Format of the git commit link
link_parsers = [
2025-04-30 17:32:18 +05:30
{ pattern = "#(\\d+)", href = "https://github.com/bahdotsh/wrkflw/issues/$1" },
2025-04-21 17:13:33 +05:30
]
filter_commits = true
tag_pattern = "v[0-9]*"
ignore_tags = ""
date_format = "%Y-%m-%d"
sort_commits = "oldest"