mirror of
https://github.com/orhun/git-cliff.git
synced 2024-11-25 13:22:17 +03:00
fix(template): use 7 digits for short SHA
This commit is contained in:
parent
dfab97842f
commit
1f85263f84
@ -16,14 +16,14 @@ body = """
|
||||
{% endif %}\
|
||||
{% if previous %}\
|
||||
{% if previous.commit_id %}
|
||||
[{{ previous.commit_id | truncate(length=8, end="") }}]({{ previous.commit_id }})...\
|
||||
[{{ commit_id | truncate(length=8, end="") }}]({{ commit_id }})
|
||||
[{{ previous.commit_id | truncate(length=7, end="") }}]({{ previous.commit_id }})...\
|
||||
[{{ commit_id | truncate(length=7, end="") }}]({{ commit_id }})
|
||||
{% endif %}\
|
||||
{% endif %}\
|
||||
{% for group, commits in commits | group_by(attribute="group") %}
|
||||
### {{ group | upper_first }}
|
||||
{% for commit in commits %}
|
||||
- {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=8, end="") }}]({{ commit.id }}))\
|
||||
- {{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ commit.id }}))\
|
||||
{% endfor %}
|
||||
{% endfor %}\n
|
||||
"""
|
||||
|
@ -13,7 +13,7 @@ if [ -n "$1" ]; then
|
||||
{% for group, commits in commits | group_by(attribute=\"group\") %}
|
||||
{{ group | upper_first }}\
|
||||
{% for commit in commits %}
|
||||
- {{ commit.message | upper_first }} ({{ commit.id | truncate(length=8, end=\"\") }})\
|
||||
- {{ commit.message | upper_first }} ({{ commit.id | truncate(length=7, end=\"\") }})\
|
||||
{% endfor %}
|
||||
{% endfor %}"
|
||||
changelog=$(cargo run -- --unreleased --strip all)
|
||||
|
Loading…
Reference in New Issue
Block a user