Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 79 additions & 45 deletions .github/cliff.toml
Original file line number Diff line number Diff line change
@@ -1,66 +1,100 @@
# git-cliff configuration file
# git-cliff ~ configuration file
# https://git-cliff.org/docs/configuration

[changelog]
# changelog header
# A Tera template to be rendered as the changelog's header.
# See https://keats.github.io/tera/docs/#introduction
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

"""
# template for the changelog body
# A Tera template to be rendered for each release in the changelog.
# See https://keats.github.io/tera/docs/#introduction
body = """
{% if version %}\
{% if version -%}
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% else -%}
## [Unreleased]
{% endif -%}
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/wasabeef/git-workers/commit/{{ commit.id }}))
{%- endfor %}
{% if group == "Added" %}
### Added
{% elif group == "Changed" %}
### Changed
{% elif group == "Deprecated" %}
### Deprecated
{% elif group == "Removed" %}
### Removed
{% elif group == "Fixed" %}
### Fixed
{% elif group == "Security" %}
### Security
{% else %}
### {{ group | upper_first }}
{% endif %}
{% for commit in commits -%}
- {{ commit.message | split(pat="\n") | first | trim }}
{% endfor %}
{% endfor %}\n
"""
# template for the changelog footer
# A Tera template to be rendered as the changelog's footer.
# See https://keats.github.io/tera/docs/#introduction
footer = """
{% for release in releases -%}
{% if release.version -%}
{% if release.previous.version -%}
[{{ release.version | trim_start_matches(pat="v") }}]: \
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/compare/{{ release.previous.version }}..{{ release.version }}
{% endif -%}
{% else -%}
[unreleased]: https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}\
/compare/{{ release.previous.version }}..HEAD
{% endif -%}
{% endfor %}
<!-- generated by git-cliff -->
"""
# remove the leading and trailing whitespace from the templates
# Remove leading and trailing whitespaces from the changelog's body.
trim = true

[git]
# parse the commits based on https://www.conventionalcommits.org
# Parse commits according to the conventional commits specification.
# See https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
commit_preprocessors = [
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/wasabeef/git-workers/issues/${2}))" },
]
# regex for parsing and grouping commits
# Exclude commits that do not match the conventional commits specification.
filter_unconventional = false
# An array of regex based parsers for extracting data from the commit message.
# Assigns commits to groups.
# Optionally sets the commit's scope and can decide to exclude commits from further processing.
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^doc", group = "Documentation" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactor" },
{ message = "^style", group = "Styling" },
{ message = "^test", group = "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|ci", group = "Miscellaneous Tasks" },
{ body = ".*security", group = "Security" },
{ message = "^revert", group = "Revert" },
{ message = "^feat", group = "Added" },
{ message = "^add", group = "Added" },
{ message = "^support", group = "Added" },
{ message = "^fix", group = "Fixed" },
{ message = "^perf", group = "Fixed" },
{ message = "^refactor", group = "Changed" },
{ message = "^style", group = "Changed" },
{ message = "^test", group = "Changed" },
{ message = "^chore", group = "Changed" },
{ message = "^docs", group = "Changed" },
{ message = "^ci", group = "Changed" },
{ message = "^build", group = "Changed" },
{ message = "^remove", group = "Removed" },
{ message = "^delete", group = "Removed" },
{ message = ".*deprecated", group = "Deprecated" },
{ message = ".*security", group = "Security" },
{ message = "^.*", group = "Changed" },
]
# protect against committing breaking changes
protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
# Prevent commits that are breaking from being excluded by commit parsers.
filter_commits = false
# sort the tags topologically
# Order releases topologically instead of chronologically.
topo_order = false
# sort the commits inside sections by oldest/newest order
sort_commits = "oldest"
# Order of commits in each group/release within the changelog.
# Allowed values: newest, oldest
sort_commits = "oldest"

Loading
Loading