1.07 KB / 33 lines / 29 loc
<% layout("/layouts/repo.eta") %>
<%~ include("./_nav.eta", {...it, view: "commits"}) %>
<% const pathSuffix = it.path && it.path !== "/" ? "/" + it.path : "" %>
<% if (it.commitGroups.length === 0) { %>
<div class="box">No commits found.</div>
<% } %>
<% for (const group of it.commitGroups) { %>
<h3><%= group.title %></h3>
<% for (const commit of group.commits) { %>
<div class="commit">
<div>
<div>
<a href="/<%= it.repo.owner %>/<%= it.repo.name %>/commit/<%= commit.oid %>"><%= commit.shortMessage %></a>
</div>
<div class="commit-author">
by
<% for (const author of commit.authors) { %>
<a href="/<%= author.login %>"><%= author.login %></a>
<% } %>
</div>
</div>
<div class="commit-sha">
<code><%= commit.oid.substring(0, 7) %></code>
<% /* Like GitHub, blindly link to blob and redirect for trees */ %>
<a href="/<%= it.repo.owner %>/<%= it.repo.name %>/blob/<%= commit.oid %><%= pathSuffix %>">Browse</a>
</div>
</div>
<% } %>
<% } %>