Skip to content

Commit 93cd2f2

Browse files
committed
feat(cliff): Better cliff file
Signed-off-by: dark0dave <dark0dave@mykolab.com>
1 parent bd13a35 commit 93cd2f2

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

cliff.toml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# git-cliff ~ configuration file
1+
# git-cliff ~ default configuration file
22
# https://git-cliff.org/docs/configuration
3-
# Remote for git-cliff
43
[remote.github]
54
owner = "dark0dave"
65
repo = "infinity_dialog"
@@ -19,20 +18,25 @@ body = """\
1918
| filter(attribute="merge_commit", value=false) %}
2019
- {{commit.scope}}: \
2120
{{ commit.message }}\
22-
{% if not commit.github.pr_number %} []({{ self::remote_url() }}/commit/{{ commit.id }}){%- endif %}\
21+
{% if not commit.github.pr_number %} [{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}){%- endif %}\
2322
{% if commit.github.username %} by @{{ commit.github.username }}\
2423
{% else %} by [{{ commit.author.name }}](https://github.com/{{ commit.author.name }}){%- endif %}\
2524
{%- endfor -%}
2625
{% endfor %}
26+
{% if version %}
27+
{% if previous.version %}\
28+
Full Changelog: [{{ previous.version }}...{{ version }}]({{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }})\
29+
{% endif %}\
30+
{% else -%}\
31+
{% raw %}\n{% endraw %}\
32+
{% endif %}\
2733
{% if github.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
2834
### New Contributors
2935
{% for contributor in github.contributors | filter(attribute="is_first_time", value=true) %}
30-
* @{{ contributor.username }} made their first contribution {% if contributor.pr_number %} in #{{ contributor.pr_number }} {%- endif %}
36+
* @{{ contributor.username }} made their first contribution in #{{ contributor.pr_number }}
3137
{%- endfor -%}
3238
{%- endif %}
33-
3439
Full Changelog: [{{ previous.version }}...{{ version }}]({{ self::remote_url() }}/compare/{{ previous.version }}...{{ version }})
35-
3640
{%- macro remote_url() -%}
3741
https://github.com/{{ remote.github.owner }}/{{ remote.github.repo }}
3842
{%- endmacro -%}
@@ -54,7 +58,7 @@ filter_unconventional = false
5458
split_commits = false
5559
# regex for preprocessing the commit messages
5660
commit_preprocessors = [
57-
# { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"}, # replace issue numbers
61+
{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "" },
5862
]
5963
# regex for parsing and grouping commits
6064
commit_parsers = [

0 commit comments

Comments
 (0)