Add gitlab webhook support
This commit is contained in:
parent
9d41d56e0c
commit
a1ae717c8f
26 changed files with 1824 additions and 8 deletions
27
templates/gitlab/messages/push.html
Normal file
27
templates/gitlab/messages/push.html
Normal 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 -%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue