Add gitlab webhook support

This commit is contained in:
Abel Luck 2022-12-01 13:47:27 +00:00
parent 9d41d56e0c
commit a1ae717c8f
26 changed files with 1824 additions and 8 deletions

View file

@ -0,0 +1,27 @@
{{ templates.repo_sender_prefix }}
{% if is_deleted_ref %}
deleted branch
{% else %}
pushed
<a href="{{ diff_url }}" data-mautrix-exclude-plaintext>
{{- total_commits_count }} commit{{ pluralize(total_commits_count) -}}
</a>
to
{% endif %}
<a data-mautrix-exclude-plaintext href="{{ ref_url }}">{{ ref_name }}</a>
{%- if is_new_ref %} (new branch){% endif -%}
{%- if commits|length > 0 %}:
<ul>
{% for commit in commits[-5:] %}
<li>
<code><a data-mautrix-exclude-plaintext href="{{ commit.url }}">
{{- commit.id[:8] -}}
</a></code>
{{ commit.cut_message|e }}
{% if commit.author.name != user_name and commit.author.name != user_username %}
by {{ commit.author.name }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif -%}