Skip to content

Commit

Permalink
chore(cliff): Update git cliff
Browse files Browse the repository at this point in the history
Signed-off-by: dark0dave <[email protected]>
  • Loading branch information
dark0dave committed Apr 14, 2024
1 parent 1fab5bc commit c476620
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
id: git-cliff
with:
config: cliff.toml
args: --verbose
args: --latest --verbose
env:
OUTPUT: CHANGELOG.md
- name: Print the changelog
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "mod_installer"
version = "3.5.0"
version = "5.0.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
93 changes: 53 additions & 40 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.

[remote.github]
owner = "dark0dave"
repo = "mod_installer"
[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")
| unique(attribute="message")
| filter(attribute="merge_commit", value=false) %}
- {{commit.scope}}: \
{{ commit.message }}\
{% if not commit.github.pr_number %} [{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}){%- endif %}\
{% if commit.github.username %} by @{{ commit.github.username }}\
{% else %} by [{{ commit.author.name }}](https://github.com/{{ commit.author.name }}){%- endif %}\
{%- endfor -%}
{% endfor %}
{% if version %}
{% if previous.version %}\
Full Changelog: [{{ previous.version }}...{{ version }}]({{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }})\
{% endif %}\
{% else -%}\
{% raw %}\n{% endraw %}\
{% endif %}\
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
### New Contributors
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
* @{{ contributor.username }} made their first contribution in #{{ contributor.pr_number }}
{%- endfor -%}
{%- endif %}
{%- macro remote_url() -%}
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
{%- endmacro -%}
"""
# 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,40 +52,41 @@ 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
commit_preprocessors = [
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"}, # replace issue numbers
# remove pr numbers from commits
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
]
# 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 = "^v[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 c476620

Please sign in to comment.