blob: 0adafe9d40c83c168aa971a17bbdeb5be36a4c7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
<%
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"
%>
<div class="box">
<h2><%~ it.titleHtml %></h2>
#<%= it.number %>
<span class="pill state <%= it.state === "CLOSED" ? "state-closed" : "state-open" %>"><%= stateText %></span>
<% 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) { %>
<a href="/<%= assignee %>"><%= assignee %></a>
<% } %>
<% } %>
<% if (it.milestone) { %>
milestone <a href="<%= it.milestone.href %>"><%= it.milestone.title %></a>
<% } %>
</div>
<%~ include("./_issueComment.eta", { comment: it.body }) %>
<% for (const item of it.timeline) { %>
<% if (item.kind === "comment") { %>
<%~ include("./_issueComment.eta", { comment: item }) %>
<% } else { %>
<div class="issue-event"<% if (item.anchor) { %> id="<%= item.anchor %>"<% } %>>
<span>
<% if (item.actor) { %>
<a href="/<%= item.actor %>"><%= item.actor %></a>
<% } else { %>
<span class="placeholder">ghost</span>
<% } %>
<%= item.description %><% if (item.label) { %> <%~ include("./_issueLabel.eta", { label: item.label }) %> label<% } %><% if (item.link) { %> <a href="<%= item.link.href %>"><%= item.link.text %></a><% } %>
</span>
<span class="timestamp">
<% if (item.anchor) { %>
<a href="#<%= item.anchor %>"><time title="<%= item.createdAt %>"><%= item.createdAt.split("T")[0] %></time></a>
<% } else { %>
<time title="<%= item.createdAt %>"><%= item.createdAt.split("T")[0] %></time>
<% } %>
</span>
</div>
<% } %>
<% } %>
<% if (it.hiddenItems > 0) { %>
<div class="box placeholder">
<%= it.hiddenItems %> later
<%= it.hiddenItems === 1 ? "comment or event is" : "comments and events are" %> only on GitHub.
</div>
<% } %>
|