Skip to content

Commit

Permalink
ci: fix links in CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
delehef committed Jan 28, 2025
1 parent 196952f commit 3dab65b
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions cliff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,27 @@ body = """
{% endif %}\
{% if previous %}\
{% if previous.commit_id and commit_id %}
[{{ previous.commit_id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ previous.commit_id }})...\
[{{ commit_id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit_id }})
[Compare {{ previous.commit_id | truncate(length=7, end="") }} ... {{ commit_id | truncate(length=7, end ="") }}]({{ self::remote_url() }}/compare/{{ previous.commit_id }}...{{ commit_id }})
{% endif %}\
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits | filter(attribute="scope") | sort(attribute="scope") %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}\
{% if commit.breaking %}[**breaking**] {% endif %}\
{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))\\
{% if commit.remote.pr_number %} in \
[#{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }}) \
{%- endif %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}{% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first }}
{%- if commit.remote.pr_number %} \
- in [PR #{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }})
{%- else %} \
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))
{%- endif %}
{% endfor %}
{% raw %}\n{% endraw %}\
{% raw %}\n{% endraw %}\
{%- for commit in commits %}
- {{ commit.message | upper_first }}
{%- if commit.remote.pr_number %} \
- in [PR #{{ commit.remote.pr_number }}]({{ self::remote_url() }}/pull/{{ commit.remote.pr_number }})
{%- else %} \
([{{ commit.id | truncate(length=7, end="") }}]({{ self::remote_url() }}/commit/{{ commit.id }}))
{%- endif %}
{% endfor -%}
{% raw %}\n{% endraw %}\
{% endfor %}\n
Expand Down Expand Up @@ -77,6 +81,8 @@ commit_preprocessors = [
# Check spelling of the commit with https://github.com/crate-ci/typos
# If the spelling is incorrect, it will be automatically fixed.
#{ pattern = '.*', replace_command = 'typos --write-changes -' },
# Strip PR references
{ pattern = ' \(#[0-9]+\)', replace = ""},
]
# regex for parsing and grouping commits
commit_parsers = [
Expand Down

0 comments on commit 3dab65b

Please sign in to comment.