{% macro breadcrumb(ref, repo, path, path_join) %} {# TODO: Default branches other than master #} {% if ref != "master" %} ref: {{ ref }} {% endif %} {% if path != [''] %} {{repo.name}}{% endif %}/{% for part in path%}{% if loop.last %}{{part}}{% else %}{{part}}/{% endif %}{% endfor %} {% endmacro %} {% macro commit_event(repo, c, full_body=False, refs={}, full_id=False, parents=False, skip_body=False) %}
{% if full_id %} {{c.id.hex}} {% else %} {{c.id.hex[:8]}} {% endif %} — {% set author_user = lookup_user(c.author.email) %} {% if author_user %} {{c.author.name}} {% else %} {{c.author.name}} {% endif %} {{ commit_time(c) | date }} {% if parents and any(c.parents) %} {{icon('code-branch', cls="sm")}} {% for parent in c.parents %} {{parent.short_id}} {% if not loop.last %} + {% endif %} {% endfor %} {% endif %} {% if c.id.hex in refs %} {% for ref in refs[c.id.hex] %} {{ref.name}} {% endfor %} {% endif %}
{% if not skip_body %} {% if full_body %}
{{c.message}}
{% else %}
{{ trim_commit(c.message) }}
{% endif %} {% endif %} {% endmacro %}