Skip to content
Snippets Groups Projects
Commit 9759fc79f1cc authored by Yorick Peterse's avatar Yorick Peterse
Browse files

Allow custom MR links for changelog entries

This adds support for specifying a custom merge request link for
changelogs, using the trailer "MR". While the value can technically be
both a link and a Markdown reference, I strongly suggest we use regular
links. Regular links are easier to work with from the terminal, and will
work across mirrors (unlike short references such as !123).

See https://gitlab.com/gitlab-com/gl-infra/delivery/-/issues/1551 for
more information.
parent f38e0ee28219
No related branches found
No related tags found
2 merge requests!39Bumped oldstable branch to Heptapod 0.21,!31GitLab 13.10
......@@ -11,3 +11,25 @@
security: Security
performance: Performance
other: Other
template: |
{% if categories %}
{% each categories %}
### {{ title }} ({% if single_change %}1 change{% else %}{{ count }} changes{% end %})
{% each entries %}
- [{{ title }}]({{ commit.reference }})\
{% if author.contributor %} by {{ author.reference }}{% end %}\
{% if commit.trailers.MR %}\
([merge request]({{ commit.trailers.MR }}))\
{% else %}\
{% if merge_request %}\
([merge request]({{ merge_request.reference }}))\
{% end %}\
{% end %}
{% end %}
{% end %}
{% else %}
No changes.
{% end %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment