Open joergklein opened 2 months ago
Thanks for opening your first issue at git-cliff! Be sure to follow the issue template! ⛰️
You can update the body
like so:
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 %}
- {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first | trim }} ([{{ commit.id | truncate(length=7, end="") }}](<REPO>/commit/{{ commit.id }}))\
{% if commit.gitlab.username and commit.gitlab.username != remote.gitlab.owner %} by [@{{ commit.gitlab.username }}](https://gitlab.com/{{ commit.gitlab.username }}){%- endif -%}
{% if commit.gitlab.pr_number %} in [#{{ commit.gitlab.pr_number }}]( <REPO>/-/commit/{{ commit.gitlab.pr_number }}){%- endif -%}
{% endfor %}
{% endfor %}
{%- if gitlab.contributors | filter(attribute="is_first_time", value=true) | length != 0 %}
## New Contributors
{%- endif -%}
{% for contributor in contributors %}
{% if contributor.pr_number -%}\
* [@{{ contributor.username }}](https://gitlab.com/{{ contributor.username }}) made their first contribution in [!{{ contributor.pr_number }}](<REPO>/-/merge_requests/{{ contributor.pr_number }})\
{% endif -%}\
{%- endfor %}\n
"""
Please take a look at cliff.toml and GitLab (Discussion #730)
new contributors Needs the merge_number after the ! There seems to be a bug with this, I'm not sure what is going on. Feel free to create a separate issue and I can look into it.
In the meantime you can add a guard like this:
Is it possible to put this lines into the code below? The error message witch I get is:
cliff.toml