Files

27 lines
823 B
Handlebars
Raw Permalink Normal View History

{{/* the logic should be kept the same as getIssueIcon/getIssueColorClass in JS code */}}
2024-12-24 09:54:19 +08:00
{{- if .IsPull -}}
{{- if not .PullRequest -}}
No PullRequest
2024-12-24 09:54:19 +08:00
{{- else -}}
{{- if .IsClosed -}}
{{- if .PullRequest.HasMerged -}}
{{- svg "octicon-git-merge" 16 "tw-text-purple" -}}
2024-12-24 09:54:19 +08:00
{{- else -}}
{{- svg "octicon-git-pull-request-closed" 16 "tw-text-red" -}}
2024-12-24 09:54:19 +08:00
{{- end -}}
{{- else -}}
{{- if .PullRequest.IsWorkInProgress ctx -}}
{{- svg "octicon-git-pull-request-draft" 16 "tw-text-text-light" -}}
2024-12-24 09:54:19 +08:00
{{- else -}}
{{- svg "octicon-git-pull-request" 16 "tw-text-green" -}}
2024-12-24 09:54:19 +08:00
{{- end -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- if .IsClosed -}}
{{- svg "octicon-issue-closed" 16 "tw-text-red" -}}
2024-12-24 09:54:19 +08:00
{{- else -}}
{{- svg "octicon-issue-opened" 16 "tw-text-green" -}}
2024-12-24 09:54:19 +08:00
{{- end -}}
{{- end -}}