Skip to content

Commit

Permalink
config: update the git cliff template
Browse files Browse the repository at this point in the history
  • Loading branch information
Sycrosity committed Sep 1, 2023
1 parent eea0091 commit a1872a4
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,33 @@
header = """
# Changelog\n
"""
# template for the changelog body
# https://tera.netlifyx.app/docs/#introduction
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | upper_first }}
{% for commit in commits %}
- {{ commit.message | upper_first | trim_end }} - [{{ commit.author.name }}]({{ commit.author.email }}) ([{{ commit.id | truncate(length=7, end="") }}]($REPO/commit/{{ commit.id }})) {% if not commit.conventional %}❌{% endif %}
{% endfor %}
{% endfor %}\n
"""

# changelog footer
footer = ""

# postprocessors
postprocessors = [
{ pattern = '\$REPO', replace = "https://github.com/cosmiccrew/galaxy" }, # replace repository URL
]

[git]
# filter out the commits that are not conventional
filter_unconventional = false
# process each line of a commit as an individual commit
split_commits = false

# regex for parsing and grouping commits
commit_parsers = [
Expand All @@ -27,15 +47,16 @@ commit_parsers = [
{ 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", skip = true },
# { message = "^chore\\(release\\): prepare for", skip = true },
# { message = "^chore\\(deps\\)", skip = true },
# { message = "^chore\\(pr\\)", skip = true },
# { message = "^chore\\(pull\\)", skip = true },
{ body = ".*security", group = "Security" },
{ message = "^revert", group = "Revert" },

{ message = "^config", group = "Config" },
{ message = "^ci", skip = true },
{ message = "^ci", group = "CI", skip = true },
{ message = "^deps", group = "Dependencies" },
{ message = "^dependabot", skip = true },

Expand Down

0 comments on commit a1872a4

Please sign in to comment.