Menu
Public repository / b9bf8c65e7cff19e76ae78f73b05d66f6a1b4729
AkurAI-Build / app/pages/repository-history.html
Latest change 34fb1ee8d3093927513e21ddd902f4ce1d7385c1 - Commit history, commit diff, compare and blame API and pages (OLI-268) by Ólafur Búi Ólafsson
{% extends "layouts/base.html" %}
{% block title %}{{ page.repository.name }} / {{ page.heading }} - AkurAI Build{% endblock %}
{% block page %}repository-history{% endblock %}
{% block body %}
<main class="{% if page.public %}ab-public{% else %}pt-app-content{% endif %}">
{% if page.public %}{% include "partials/public-header.html" %}{% endif %}
<p class="pt-breadcrumb"><a href="{{ page.repo_href }}">{{ page.repository.name }}</a><span aria-hidden="true">/</span><strong>{{ page.heading }}</strong></p>
<section class="pt-panel">
<div class="pt-panel-head"><h1>{{ page.heading }}</h1></div>
{% if page.kind == "commits" or page.kind == "compare" %}
{% if page.kind == "compare" %}<p>Merge base: <code>{{ page.merge_base or "none" }}</code></p>{% endif %}
<ol class="pt-commit-list">
{% for commit in page.commits %}
<li><a href="{{ page.commit_prefix }}{{ commit.sha }}"><code>{{ commit.sha[:8] }}</code> {{ commit.subject }}</a> <small>{{ commit.author }}</small></li>
{% else %}<li>No commits.</li>{% endfor %}
</ol>
{% if page.next_href %}<a class="pt-button pt-small" href="{{ page.next_href }}">Older commits</a>{% endif %}
{% endif %}
{% if page.kind == "commit" %}
<p><code>{{ page.sha }}</code> by {{ page.author }}</p>
{% if page.body %}<pre>{{ page.body }}</pre>{% endif %}
{% endif %}
{% if page.kind == "commit" or page.kind == "compare" %}
<ul class="pt-diff-files">{% for file in page.files %}<li>{{ file.path }} <small>+{{ file.additions if file.additions is not none else "bin" }} -{{ file.deletions if file.deletions is not none else "bin" }}</small></li>{% endfor %}</ul>
{% if page.truncated %}<p><strong>Diff truncated.</strong></p>{% endif %}
<pre class="pt-diff"><code>{{ page.patch }}</code></pre>
{% endif %}
{% if page.kind == "blame" %}
<table class="pt-blame"><tbody>
{% for line in page.blame_lines %}
<tr><td><a href="{{ page.commit_prefix }}{{ line.sha }}"><code>{{ line.sha[:8] }}</code></a></td><td>{{ line.author }}</td><td>{{ line.line }}</td><td><pre>{{ line.content }}</pre></td></tr>
{% endfor %}
</tbody></table>
{% endif %}
</section>
{% if page.public %}{% include "partials/public-footer.html" %}{% endif %}
</main>
{% endblock %}