{{ template "base/alert" }} {{range .Issue.Comments}} {{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }} {{if eq .Type 0}}
{{if .OriginalAuthor }} {{else}} {{avatar .Poster}} {{end}}
{{if .OriginalAuthor }} {{ .OriginalAuthor }} {{$.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if $.Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} {{else}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}} {{end}}
{{if not $.Repository.IsArchived}} {{if or (and (eq .PosterID .Issue.PosterID) (eq .Issue.OriginalAuthorID 0)) (and (eq .Issue.OriginalAuthorID .OriginalAuthorID) (not (eq .OriginalAuthorID 0))) }}
{{$.i18n.Tr "repo.issues.poster"}}
{{end}} {{if gt .ShowTag 0}}
{{if eq .ShowTag 2}} {{$.i18n.Tr "repo.issues.collaborator"}} {{else if eq .ShowTag 3}} {{$.i18n.Tr "repo.issues.owner"}} {{end}}
{{end}} {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}} {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" false "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} {{end}}
{{if .RenderedContent}} {{.RenderedContent|Str2html}} {{else}} {{$.i18n.Tr "repo.issues.no_content"}} {{end}}
{{.Content}}
{{if .Attachments}} {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}} {{end}}
{{$reactions := .Reactions.GroupByType}} {{if $reactions}}
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
{{end}}
{{else if eq .Type 1}}
{{svg "octicon-dot-fill"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{if .Issue.IsPull }} {{$.i18n.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}} {{end}}
{{else if eq .Type 2}}
{{svg "octicon-circle-slash"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{if .Issue.IsPull }} {{$.i18n.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}} {{end}}
{{else if eq .Type 28}}
{{svg "octicon-git-merge"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$link := printf "%s/commit/%s" $.Repository.HTMLURL $.Issue.PullRequest.MergedCommitID}} {{if eq $.Issue.PullRequest.Status 3}} {{$.i18n.Tr "repo.issues.manually_pull_merged_at" $link (ShortSha $.Issue.PullRequest.MergedCommitID) $.BaseTarget $createdStr | Str2html}} {{else}} {{$.i18n.Tr "repo.issues.pull_merged_at" $link (ShortSha $.Issue.PullRequest.MergedCommitID) $.BaseTarget $createdStr | Str2html}} {{end}}
{{else if eq .Type 3 5 6}} {{ $refFrom:= "" }} {{if ne .RefRepoID .Issue.RepoID}} {{ $refFrom = $.i18n.Tr "repo.issues.ref_from" .RefRepo.FullName }} {{end}} {{ $refTr := "repo.issues.ref_issue_from" }} {{if .Issue.IsPull}} {{ $refTr = "repo.issues.ref_pull_from" }} {{else if eq .RefAction 1 }} {{ $refTr = "repo.issues.ref_closing_from" }} {{else if eq .RefAction 2 }} {{ $refTr = "repo.issues.ref_reopening_from" }} {{end}} {{ $createdStr:= TimeSinceUnix .CreatedUnix $.Lang }}
{{svg "octicon-bookmark"}} {{avatar .Poster}} {{if eq .RefAction 3}}{{end}} {{.Poster.GetDisplayName}} {{$.i18n.Tr $refTr .EventTag $createdStr .RefCommentHTMLURL $refFrom | Safe}} {{if eq .RefAction 3}}{{end}}
{{.RefIssueTitle | Str2html}} {{.RefIssueIdent | Str2html}}
{{else if eq .Type 4}}
{{svg "octicon-bookmark"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
{{svg "octicon-git-commit"}} {{.Content | Str2html}}
{{else if eq .Type 7}} {{if or .AddedLabels .RemovedLabels}}
{{svg "octicon-tag"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{if and .AddedLabels (not .RemovedLabels)}} {{$.i18n.Tr (TrN $.i18n.Lang (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels") (RenderLabels .AddedLabels) $createdStr | Safe}} {{else if and (not .AddedLabels) .RemovedLabels}} {{$.i18n.Tr (TrN $.i18n.Lang (len .RemovedLabels) "repo.issues.remove_label" "repo.issues.remove_labels") (RenderLabels .RemovedLabels) $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.add_remove_labels" (RenderLabels .AddedLabels) (RenderLabels .RemovedLabels) $createdStr | Safe}} {{end}}
{{end}} {{else if eq .Type 8}}
{{svg "octicon-milestone"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}
{{else if eq .Type 9}}
{{svg "octicon-person"}} {{if gt .AssigneeID 0}} {{if .RemovedAssignee}} {{avatar .Assignee}} {{.Assignee.GetDisplayName}} {{ if eq .Poster.ID .Assignee.ID }} {{$.i18n.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}} {{ else }} {{$.i18n.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}} {{ end }} {{else}} {{avatar .Assignee}} {{.Assignee.GetDisplayName}} {{if eq .Poster.ID .AssigneeID}} {{$.i18n.Tr "repo.issues.self_assign_at" $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}} {{end}} {{end}} {{end}}
{{else if eq .Type 10}}
{{svg "octicon-pencil"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji) (.NewTitle|RenderEmoji) $createdStr | Safe}}
{{else if eq .Type 11}}
{{svg "octicon-git-branch"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}}
{{else if eq .Type 12}}
{{svg "octicon-clock"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
{{else if eq .Type 13}}
{{svg "octicon-clock"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}} {{ template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" . }}
{{svg "octicon-clock"}} {{.Content}}
{{else if eq .Type 14}}
{{svg "octicon-clock"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.add_time_history" $createdStr | Safe}} {{ template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" . }}
{{svg "octicon-clock"}} {{.Content}}
{{else if eq .Type 15}}
{{svg "octicon-clock"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
{{else if eq .Type 16}}
{{svg "octicon-clock"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}}
{{else if eq .Type 17}}
{{svg "octicon-clock"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.due_date_modified" (.Content | ParseDeadline) $createdStr | Safe}}
{{else if eq .Type 18}}
{{svg "octicon-clock"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}}
{{else if eq .Type 19}}
{{svg "octicon-package-dependents"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}} {{if .DependentIssue}}
{{svg "octicon-plus"}} {{if eq .DependentIssue.RepoID .Issue.RepoID}} #{{.DependentIssue.Index}} {{.DependentIssue.Title}} {{else}} {{.DependentIssue.Repo.FullName}}#{{.DependentIssue.Index}} - {{.DependentIssue.Title}} {{end}}
{{end}}
{{else if eq .Type 20}}
{{svg "octicon-package-dependents"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}} {{if .DependentIssue}}
{{svg "octicon-trash"}} {{if eq .DependentIssue.RepoID .Issue.RepoID}} #{{.DependentIssue.Index}} {{.DependentIssue.Title}} {{else}} {{.DependentIssue.Repo.FullName}}#{{.DependentIssue.Index}} - {{.DependentIssue.Title}} {{end}}
{{end}}
{{else if eq .Type 22}}
{{if .OriginalAuthor }} {{else}} {{avatar .Poster}} {{end}} {{svg (printf "octicon-%s" .Review.Type.Icon)}} {{if .OriginalAuthor }} {{ .OriginalAuthor }} {{if $.Repository.OriginalURL}}({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} {{else}} {{.Poster.GetDisplayName}} {{end}} {{if eq .Review.Type 1}} {{$.i18n.Tr "repo.issues.review.approve" $createdStr | Safe}} {{else if eq .Review.Type 2}} {{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}} {{else if eq .Review.Type 3}} {{$.i18n.Tr "repo.issues.review.reject" $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.review.comment" $createdStr | Safe}} {{end}} {{if .Review.Dismissed}}
{{$.i18n.Tr "repo.issues.review.dismissed_label"}}
{{end}}
{{if .Content}}
{{if .OriginalAuthor }} {{ .OriginalAuthor }} {{if $.Repository.OriginalURL}}({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} {{else}} {{.Poster.GetDisplayName}} {{end}} {{$.i18n.Tr "repo.issues.review.left_comment" | Safe}}
{{if .RenderedContent}} {{.RenderedContent|Str2html}} {{else}} {{$.i18n.Tr "repo.issues.no_content"}} {{end}}
{{if .Attachments}} {{template "repo/issue/view_content/attachments" Dict "ctx" $ "Attachments" .Attachments "Content" .RenderedContent}} {{end}}
{{end}} {{if .Review.CodeComments}}
{{ range $filename, $lines := .Review.CodeComments}} {{range $line, $comms := $lines}}
{{$invalid := (index $comms 0).Invalidated}} {{$resolved := (index $comms 0).IsResolved}} {{$resolveDoer := (index $comms 0).ResolveDoer}} {{$isNotPending := (not (eq (index $comms 0).Review.Type 0))}}
{{$filename}} {{if $invalid }} {{$.i18n.Tr "repo.issues.review.outdated"}} {{end}}
{{if or $invalid $resolved}} {{end}}
{{$diff := (CommentMustAsDiff (index $comms 0))}} {{if $diff}} {{$file := (index $diff.Files 0)}}
{{template "repo/diff/section_unified" dict "file" $file "root" $}}
{{end}}
{{range $comms}} {{ $createdSubStr:= TimeSinceUnix .CreatedUnix $.Lang }}
{{if not .OriginalAuthor }} {{avatar .Poster}} {{end}} {{if .OriginalAuthor }} {{ .OriginalAuthor }} {{if $.Repository.OriginalURL}}({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} {{else}} {{.Poster.GetDisplayName}} {{end}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}}
{{if not $.Repository.IsArchived}} {{if or (and (eq .PosterID $.Issue.PosterID) (eq $.Issue.OriginalAuthorID 0)) (eq $.Issue.OriginalAuthorID .OriginalAuthorID) }}
{{$.i18n.Tr "repo.issues.poster"}}
{{end}} {{if gt .ShowTag 0}}
{{if eq .ShowTag 2}} {{$.i18n.Tr "repo.issues.collaborator"}} {{else if eq .ShowTag 3}} {{$.i18n.Tr "repo.issues.owner"}} {{end}}
{{end}} {{template "repo/issue/view_content/add_reaction" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID)}} {{template "repo/issue/view_content/context_menu" Dict "ctx" $ "item" . "delete" true "issue" true "diff" true "IsCommentPoster" (and $.IsSigned (eq $.SignedUserID .PosterID))}} {{end}}
{{if .RenderedContent}} {{.RenderedContent|Str2html}} {{else}} {{$.i18n.Tr "repo.issues.no_content"}} {{end}}
{{.Content}}
{{$reactions := .Reactions.GroupByType}} {{if $reactions}}
{{template "repo/issue/view_content/reactions" Dict "ctx" $ "ActionURL" (Printf "%s/comments/%d/reactions" $.RepoLink .ID) "Reactions" $reactions}}
{{end}}
{{end}}
{{if $resolved}}
{{svg "octicon-check" 16 "mr-2"}} {{$resolveDoer.Name}} {{$.i18n.Tr "repo.issues.review.resolved_by"}}
{{end}}
{{if and $.CanMarkConversation $isNotPending}} {{end}} {{if and $.SignedUserID (not $.Repository.IsArchived)}} {{end}}
{{template "repo/diff/comment_form_datahandler" dict "hidden" true "reply" (index $comms 0).ReviewID "root" $ "comment" (index $comms 0)}}
{{end}} {{end}}
{{end}}
{{else if eq .Type 23}}
{{svg "octicon-lock"}} {{avatar .Poster}} {{ if .Content }} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}} {{ else }} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.lock_no_reason" $createdStr | Safe}} {{ end }}
{{else if eq .Type 24}}
{{svg "octicon-key"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
{{else if eq .Type 25}}
{{svg "octicon-git-branch"}} {{avatar .Poster}} {{.Poster.Name}} {{$.i18n.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
{{else if eq .Type 26}}
{{svg "octicon-clock"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.del_time_history" $createdStr | Safe}}
{{svg "octicon-clock"}} {{.Content}}
{{else if eq .Type 27}}
{{svg "octicon-eye"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{if (gt .AssigneeID 0)}} {{if .RemovedAssignee}} {{if eq .PosterID .AssigneeID}} {{$.i18n.Tr "repo.issues.review.remove_review_request_self" $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.review.remove_review_request" (.Assignee.GetDisplayName|Escape) $createdStr | Safe}} {{end}} {{else}} {{$.i18n.Tr "repo.issues.review.add_review_request" (.Assignee.GetDisplayName|Escape) $createdStr | Safe}} {{end}} {{else}} {{if .RemovedAssignee}} {{$.i18n.Tr "repo.issues.review.remove_review_request" (.AssigneeTeam.Name|Escape) $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.review.add_review_request" (.AssigneeTeam.Name|Escape) $createdStr | Safe}} {{end}} {{end}}
{{else if and (eq .Type 29) (or (gt .CommitsNum 0) .IsForcePush)}}
{{svg "octicon-repo-push"}} {{.Poster.GetDisplayName}} {{ if .IsForcePush }} {{$.i18n.Tr "repo.issues.force_push_codes" $.Issue.PullRequest.HeadBranch (ShortSha .OldCommit) ($.Issue.Repo.CommitLink .OldCommit) (ShortSha .NewCommit) ($.Issue.Repo.CommitLink .NewCommit) $createdStr | Safe}} {{else}} {{$.i18n.Tr (TrN $.i18n.Lang .Commits.Len "repo.issues.push_commit_1" "repo.issues.push_commits_n") .Commits.Len $createdStr | Safe}} {{end}}
{{if not .IsForcePush}} {{template "repo/commits_list_small" dict "comment" . "root" $}} {{end}} {{else if eq .Type 30}} {{if not $.UnitProjectsGlobalDisabled}}
{{svg "octicon-project"}} {{avatar .Poster}} {{.Poster.GetDisplayName}} {{if gt .OldProjectID 0}} {{if gt .ProjectID 0}} {{$.i18n.Tr "repo.issues.change_project_at" (.OldProject.Title|Escape) (.Project.Title|Escape) $createdStr | Safe}} {{else}} {{$.i18n.Tr "repo.issues.remove_project_at" (.OldProject.Title|Escape) $createdStr | Safe}} {{end}} {{else if gt .ProjectID 0}} {{$.i18n.Tr "repo.issues.add_project_at" (.Project.Title|Escape) $createdStr | Safe}} {{end}}
{{end}} {{else if eq .Type 32}}
{{svg "octicon-x" 16}} {{.Poster.GetDisplayName}} {{$reviewerName := ""}} {{if eq .Review.OriginalAuthor ""}} {{$reviewerName = .Review.Reviewer.Name}} {{else}} {{$reviewerName = .Review.OriginalAuthor}} {{end}} {{$.i18n.Tr "repo.issues.review.dismissed" $reviewerName $createdStr | Safe}}
{{if .Content}}
{{$.i18n.Tr "action.review_dismissed_reason"}}
{{if .RenderedContent}} {{.RenderedContent|Str2html}} {{else}} {{$.i18n.Tr "repo.issues.no_content"}} {{end}}
{{end}}
{{end}} {{end}}