{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
{{end}}

{{RenderIssueTitle $.Context .Issue.Title $.RepoLink $.Repository.ComposeMetas | RenderCodeBlock}} #{{.Issue.Index}}

{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
{{end}}
{{if .HasMerged}}
{{svg "octicon-git-merge" 16}} {{if eq .Issue.PullRequest.Status 3}}{{.locale.Tr "repo.pulls.manually_merged"}}{{else}}{{.locale.Tr "repo.pulls.merged"}}{{end}}
{{else if .Issue.IsClosed}}
{{if .Issue.IsPull}}{{svg "octicon-git-pull-request"}}{{else}}{{svg "octicon-issue-closed"}}{{end}} {{.locale.Tr "repo.issues.closed_title"}}
{{else if .Issue.IsPull}} {{if .IsPullWorkInProgress}}
{{svg "octicon-git-pull-request-draft"}} {{.locale.Tr "repo.issues.draft_title"}}
{{else}}
{{svg "octicon-git-pull-request"}} {{.locale.Tr "repo.issues.open_title"}}
{{end}} {{else}}
{{svg "octicon-issue-opened"}} {{.locale.Tr "repo.issues.open_title"}}
{{end}} {{if .Issue.IsPull}} {{$headHref := .HeadTarget|Escape}} {{if .HeadBranchLink}} {{$headHref = printf "%s" (.HeadBranchLink | Escape) $headHref}} {{end}} {{$headHref = printf "%s %s" $headHref (.locale.Tr "copy_branch") (.HeadTarget | Escape) (svg "octicon-copy" 14)}} {{$baseHref := .BaseTarget|Escape}} {{if .BaseBranchLink}} {{$baseHref = printf "%s" (.BaseBranchLink | Escape) $baseHref}} {{end}} {{if .Issue.PullRequest.HasMerged}} {{$mergedStr:= TimeSinceUnix .Issue.PullRequest.MergedUnix $.locale}} {{if .Issue.OriginalAuthor}} {{.Issue.OriginalAuthor}} {{$.locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr | Safe}} {{else}} {{.Issue.PullRequest.Merger.GetDisplayName}} {{$.locale.Tr "repo.pulls.merged_title_desc" .NumCommits $headHref $baseHref $mergedStr | Safe}} {{end}} {{else}} {{if .Issue.OriginalAuthor}} {{.Issue.OriginalAuthor}} {{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}} {{else}} {{.Issue.Poster.GetDisplayName}} {{$.locale.Tr "repo.pulls.title_desc" .NumCommits $headHref $baseHref | Safe}} {{end}} {{svg "octicon-arrow-right"}} {{end}} {{else}} {{$createdStr:= TimeSinceUnix .Issue.CreatedUnix $.locale}} {{if .Issue.OriginalAuthor}} {{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.OriginalAuthor|Escape) | Safe}} {{else if gt .Issue.Poster.ID 0}} {{$.locale.Tr "repo.issues.opened_by" $createdStr (.Issue.Poster.HomeLink|Escape) (.Issue.Poster.GetDisplayName|Escape) | Safe}} {{else}} {{$.locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}} {{end}} ยท {{$.locale.Tr "repo.issues.num_comments" .Issue.NumComments}} {{end}}