%
layout("/layouts/repo.eta")
it.path = `issues/${it.number}`
it.searchType = "issues"
const stateText = it.state !== "CLOSED"
? "Open"
: it.stateReason === "NOT_PLANNED"
? "Closed as not planned"
: it.stateReason === "DUPLICATE"
? "Closed as duplicate"
: "Closed"
%>
<%~ it.titleHtml %>
#<%= it.number %>
"><%= stateText %>
<% if (it.labels.length > 0) { %>
<% for (const label of it.labels) { %>
<%~ include("./_issueLabel.eta", { label }) %>
<% } %>
<% } %>
<% if (it.assignees.length > 0) { %>
assigned to
<% for (const assignee of it.assignees) { %>
<%= assignee %>
<% } %>
<% } %>
<% if (it.milestone) { %>
milestone
<%= it.milestone.title %>
<% } %>
<%~ include("./_issueComment.eta", { comment: it.body }) %>
<% for (const item of it.timeline) { %>
<% if (item.kind === "comment") { %>
<%~ include("./_issueComment.eta", { comment: item }) %>
<% } else { %>
id="<%= item.anchor %>"<% } %>>
<% if (item.actor) { %>
<%= item.actor %>
<% } else { %>
ghost
<% } %>
<%= item.description %><% if (item.label) { %> <%~ include("./_issueLabel.eta", { label: item.label }) %> label<% } %><% if (item.link) { %> <%= item.link.text %><% } %>
<% if (item.anchor) { %>
<% } else { %>
<% } %>
<% } %>
<% } %>
<% if (it.hiddenItems > 0) { %>
<%= it.hiddenItems %> later
<%= it.hiddenItems === 1 ? "comment or event is" : "comments and events are" %> only on GitHub.
<% } %>