Skip to content

Commit

Permalink
chore(release): Better release notes
Browse files Browse the repository at this point in the history
Signed-off-by: dark0dave <dark0dave@mykolab.com>
  • Loading branch information
dark0dave committed Jan 28, 2024
1 parent 3ec1f4a commit 48ea63c
Showing 1 changed file with 28 additions and 35 deletions.
63 changes: 28 additions & 35 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,25 @@

[changelog]
# changelog header
header = """
# Changelog\n
All notable changes to this project will be documented in this file.\n
"""
header = ""
# template for the changelog body
# https://tera.netlify.app/docs
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
### Changelog
{% 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 }}\
{% endfor %}
{% endfor %}\n
\n#### {{ group | striptags | trim | upper_first }}:
{% for commit in commits
| filter(attribute="group")
| sort(attribute="scope") %}
- {{commit.scope}}: \
{{ commit.message }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/doitintl/kube-no-trouble/commit/{{ commit.id }}) by [{{ commit.author.name }}](https://github.com/{{ commit.author.name }}))
{%- endfor -%}
{% endfor %}
"""
# remove the leading and trailing whitespace from the template
trim = true
# changelog footer
footer = """
<!-- generated by git-cliff -->
"""
footer = ""
# postprocessors
postprocessors = [
# { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL
Expand All @@ -40,7 +34,7 @@ postprocessors = [
# parse the commits based on https://www.conventionalcommits.org
conventional_commits = true
# filter out the commits that are not conventional
filter_unconventional = true
filter_unconventional = false
# process each line of a commit as an individual commit
split_commits = false
# regex for preprocessing the commit messages
Expand All @@ -49,31 +43,30 @@ commit_preprocessors = [
]
# regex for parsing and grouping commits
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 = "^(refactor|ref)", group = "Internal/Other", scope="ref" },
{ message = "^build", group = "Internal/Other", scope="build" },
{ message = "^chore", group = "Internal/Other", scope="chore" },
{ message = "^ci", group = "Internal/Other", scope="ci" },
{ message = "^dep", group = "Internal/Other", scope="dep" },
{ message = "^doc", group = "Internal/Other", scope="doc" },
{ message = "^feat", group = "Features", scope="feat" },
{ message = "^fix", group = "Fixes", scope="fix" },
{ message = "^perf", group = "Internal/Other", scope="perf" },
{ message = "^style", group = "Internal/Other", scope="style" },
{ message = "^test", group = "Internal/Other", scope="test" },
{ body = ".*security", group = "Internal/Other", scope="sec" },
{ message = "^revert", group = "Internal/Other", scope="revert" },
]
# protect breaking changes from being skipped due to matching a skipping commit_parser
protect_breaking_commits = false
# filter out the commits that are not matched by commit parsers
filter_commits = false
# glob pattern for matching git tags
tag_pattern = "v[0-9]*"
tag_pattern = "^[0-9]+.[0-9]+.[0-9]+$"
# regex for skipping tags
skip_tags = "v0.1.0-beta.1"
skip_tags = "^nightly-.*"
# regex for ignoring tags
ignore_tags = ""
ignore_tags = "^nightly-.*"
# sort the tags topologically
topo_order = false
# sort the commits inside sections by oldest/newest order
Expand Down

0 comments on commit 48ea63c

Please sign in to comment.