{{ define "title" }}{{ .Issue.Title }} · issue #{{ .Issue.IssueId }} ·{{ .RepoInfo.FullName }}{{ end }} {{ define "repoContent" }} {{ .Issue.Title }} #{{ .Issue.IssueId }} {{ $bgColor := "bg-gray-800" }} {{ $icon := "ban" }} {{ if eq .State "open" }} {{ $bgColor = "bg-green-600" }} {{ $icon = "circle-dot" }} {{ end }} {{ i $icon "w-4 h-4 mr-1.5 text-white" }} {{ .State }} opened by {{ $owner := didOrHandle .Issue.OwnerDid .IssueOwnerHandle }} {{ $owner }} {{ .Issue.Created | timeFmt }} {{ if .Issue.Body }} {{ .Issue.Body | markdown }} {{ end }} {{ end }} {{ define "repoAfter" }} {{ if gt (len .Comments) 0 }} {{ range $index, $comment := .Comments }} {{ if eq $index 0 }} {{ else }} {{ end }} {{ $owner := index $.DidHandleMap .OwnerDid }} {{ $owner }} {{ .Created | timeFmt }} {{ .Body | markdown }} {{ end }} {{ end }} {{ block "newComment" . }} {{ end }} {{ $isIssueAuthor := and .LoggedInUser (eq .LoggedInUser.Did .Issue.OwnerDid) }} {{ $isRepoCollaborator := .RepoInfo.Roles.IsCollaborator }} {{ if or $isIssueAuthor $isRepoCollaborator }} {{ $action := "close" }} {{ $icon := "circle-x" }} {{ $hoverColor := "red" }} {{ if eq .State "closed" }} {{ $action = "reopen" }} {{ $icon = "circle-dot" }} {{ $hoverColor = "green" }} {{ end }}