From fd1c054c3c10dceb1a8a355c74a0d9e9077aae19 Mon Sep 17 00:00:00 2001 From: Joe Mou Date: Mon, 21 Sep 2026 18:08:48 -0400 Subject: Add issue details Co-Authored-By: Claude Opus 5 --- views/_issueComment.eta | 18 +++++++++++++ views/_issueLabel.eta | 1 + views/issue.eta | 67 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 views/_issueComment.eta create mode 100644 views/_issueLabel.eta create mode 100644 views/issue.eta (limited to 'views') diff --git a/views/_issueComment.eta b/views/_issueComment.eta new file mode 100644 index 0000000..8a851e8 --- /dev/null +++ b/views/_issueComment.eta @@ -0,0 +1,18 @@ +
+
+ + <% if (it.comment.author) { %> + <%= it.comment.author %> + <% } else { %> + ghost + <% } %> + <% if (it.comment.association) { %> + <%= it.comment.association %> + <% } %> + + + + +
+ <%~ it.comment.bodyHtml %> +
diff --git a/views/_issueLabel.eta b/views/_issueLabel.eta new file mode 100644 index 0000000..52f622a --- /dev/null +++ b/views/_issueLabel.eta @@ -0,0 +1 @@ + title="<%= it.label.description %>"<% } %>><%= it.label.name %> diff --git a/views/issue.eta b/views/issue.eta new file mode 100644 index 0000000..0adafe9 --- /dev/null +++ b/views/issue.eta @@ -0,0 +1,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" +%> + +
+

<%~ 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. +
+<% } %> -- cgit v1.3.1