Do not add links to Posters or Assignees with ID < 0 (#20577) (#21037)

Backport #20577

There are several places in templates/repo/issue/view_content/comments.tmpl where links are made to Posters or Assignees who are Ghosts or have IDs <0.

Fix #20559

Signed-off-by: Andrew Thornton <art27@cantab.net>

Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
zeripath 2022-09-03 13:51:10 +01:00 committed by GitHub
parent e3697efbb0
commit 2f0a1eb0d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 76 additions and 128 deletions

View File

@ -32,9 +32,7 @@
</div>
<div class="ui attached segment members">
{{range .Members}}
<a href="{{.HomeLink}}" title="{{.Name}}">
{{avatar .}}
</a>
{{template "shared/user/avatarlink" .}}
{{end}}
</div>
<div class="ui bottom attached header">

View File

@ -5,9 +5,7 @@
{{if .OriginalAuthor }}
<span class="avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
{{else}}
<a class="avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header df ac sb">
@ -27,9 +25,7 @@
</span>
{{else}}
<span class="text grey">
<a {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
{{.Poster.GetDisplayName}}
</a>
{{template "shared/user/namelink" .Poster}}
{{$.root.i18n.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
</span>
{{end}}

View File

@ -8,9 +8,7 @@
<div class="twelve wide column">
<div class="ui comments">
<div class="comment">
<a class="avatar" href="{{.SignedUser.HomeLink}}">
{{avatar .SignedUser}}
</a>
{{template "shared/user/avatarlink" .SignedUser}}
<div class="ui segment content">
<div class="field">
<input name="title" id="issue_title" placeholder="{{.i18n.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" tabindex="3" autofocus required maxlength="255" autocomplete="off">

View File

@ -17,7 +17,7 @@
{{if .OriginalAuthor }}
<span class="timeline-avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
{{else}}
<a class="timeline-avatar" {{if gt .Poster.ID 0}}href="{{.Poster.HomeLink}}"{{end}}>
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
{{avatar .Poster}}
</a>
{{end}}
@ -96,11 +96,9 @@
{{else if eq .Type 1}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-green text-white">{{svg "octicon-dot-fill"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull }}
{{$.i18n.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}}
{{else}}
@ -111,11 +109,9 @@
{{else if eq .Type 2}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-red text-white">{{svg "octicon-circle-slash"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull }}
{{$.i18n.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}}
{{else}}
@ -126,11 +122,9 @@
{{else if eq .Type 28}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge bg-purple text-white">{{svg "octicon-git-merge"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$link := printf "%s/commit/%s" $.Repository.HTMLURL ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
{{if eq $.Issue.PullRequest.Status 3}}
{{$.i18n.Tr "repo.issues.manually_pull_merged_at" ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID) ($.BaseTarget|Escape) $createdStr | Str2html}}
@ -155,12 +149,10 @@
{{ $createdStr:= TimeSinceUnix .CreatedUnix $.i18n.Lang }}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-bookmark"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
{{if eq .RefAction 3}}<del>{{end}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr $refTr (.EventTag|Escape) $createdStr (.RefCommentHTMLURL|Escape) $refFrom | Safe}}
</span>
{{if eq .RefAction 3}}</del>{{end}}
@ -172,11 +164,9 @@
{{else if eq .Type 4}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-bookmark"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
</span>
<div class="detail">
@ -188,11 +178,9 @@
{{if or .AddedLabels .RemovedLabels}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-tag"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{if and .AddedLabels (not .RemovedLabels)}}
{{$.i18n.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (RenderLabels .AddedLabels) $createdStr | Safe}}
{{else if and (not .AddedLabels) .RemovedLabels}}
@ -206,11 +194,9 @@
{{else if eq .Type 8}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-milestone"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{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}}
</span>
</div>
@ -219,11 +205,9 @@
<span class="badge">{{svg "octicon-person"}}</span>
{{if gt .AssigneeID 0}}
{{if .RemovedAssignee}}
<a href="{{.Assignee.HomeLink}}">
{{avatar .Assignee}}
</a>
{{template "shared/user/avatarlink" .Assignee}}
<span class="text grey">
<a class="author" href="{{.Assignee.HomeLink}}">{{.Assignee.GetDisplayName}}</a>
<a class="author" {{if gt .Assignee.ID 0}}href="{{.Assignee.HomeLink}}"{{end}}>{{.Assignee.GetDisplayName}}</a>
{{ if eq .Poster.ID .Assignee.ID }}
{{$.i18n.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
{{ else }}
@ -231,11 +215,9 @@
{{ end }}
</span>
{{else}}
<a href="{{.Assignee.HomeLink}}">
{{avatar .Assignee}}
</a>
{{template "shared/user/avatarlink" .Assignee}}
<span class="text grey">
<a class="author" href="{{.Assignee.HomeLink}}">{{.Assignee.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .AssigneeID}}
{{$.i18n.Tr "repo.issues.self_assign_at" $createdStr | Safe}}
{{else}}
@ -248,44 +230,36 @@
{{else if eq .Type 10}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-pencil"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji) (.NewTitle|RenderEmoji) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 11}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-git-branch"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 12}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 13}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}
</span>
{{ template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" . }}
@ -297,11 +271,9 @@
{{else if eq .Type 14}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.add_time_history" $createdStr | Safe}}
</span>
{{ template "repo/issue/view_content/comments_delete_time" Dict "ctx" $ "comment" . }}
@ -313,33 +285,27 @@
{{else if eq .Type 15}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 16}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 17}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$parsedDeadline := .Content | ParseDeadline}}
{{$.i18n.Tr "repo.issues.due_date_modified" (index $parsedDeadline 0) (index $parsedDeadline 1) $createdStr | Safe}}
</span>
@ -347,22 +313,18 @@
{{else if eq .Type 18}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 19}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-package-dependents"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}}
</span>
{{if .DependentIssue}}
@ -383,11 +345,9 @@
{{else if eq .Type 20}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-package-dependents"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}}
</span>
{{if .DependentIssue}}
@ -424,7 +384,7 @@
<span class="text grey"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span>
{{else}}
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{end}}
{{if eq .Review.Type 1}}
@ -455,7 +415,7 @@
<span class="text grey"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span>
{{else}}
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{end}}
{{$.i18n.Tr "repo.issues.review.left_comment" | Safe}}
@ -583,7 +543,7 @@
<span class="text grey"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.i18n.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe }}){{end}}</span>
{{else}}
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{end}}
{{$.i18n.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdSubStr | Safe}}
</span>
@ -668,17 +628,15 @@
{{else if eq .Type 23}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-lock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
{{ if .Content }}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}}
</span>
{{ else }}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.lock_no_reason" $createdStr | Safe}}
</span>
{{ end }}
@ -686,33 +644,28 @@
{{else if eq .Type 24}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-key"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 25}}
<div class="timeline-item event">
<span class="badge">{{svg "octicon-git-branch"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a>
<a{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a>
{{$.i18n.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 26}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-clock"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$.i18n.Tr "repo.issues.del_time_history" $createdStr | Safe}}
</span>
<div class="detail">
@ -723,11 +676,9 @@
{{else if eq .Type 27}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-eye"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{if (gt .AssigneeID 0)}}
{{if .RemovedAssignee}}
{{if eq .PosterID .AssigneeID}}
@ -751,7 +702,7 @@
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-repo-push"}}</span>
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{ if .IsForcePush }}
{{$.i18n.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}}
{{else}}
@ -766,11 +717,9 @@
{{if not $.UnitProjectsGlobalDisabled}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-project"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{if gt .OldProjectID 0}}
{{if gt .ProjectID 0}}
{{$.i18n.Tr "repo.issues.change_project_at" (.OldProject.Title|Escape) (.Project.Title|Escape) $createdStr | Safe}}
@ -791,7 +740,7 @@
</a>
<span class="badge grey">{{svg "octicon-x" 16}}</span>
<span class="text grey">
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{$reviewerName := ""}}
{{if eq .Review.OriginalAuthor ""}}
{{$reviewerName = .Review.Reviewer.Name}}
@ -825,11 +774,9 @@
{{else if eq .Type 33}}
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-git-branch"}}</span>
<a href="{{.Poster.HomeLink}}">
{{avatar .Poster}}
</a>
{{template "shared/user/avatarlink" .Poster}}
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{if and .OldRef .NewRef}}
{{$.i18n.Tr "repo.issues.change_ref_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
{{else if .OldRef}}
@ -843,7 +790,7 @@
<div class="timeline-item event" id="{{.HashTag}}">
<span class="badge">{{svg "octicon-git-merge" 16}}</span>
<span class="text grey">
<a class="author" href="{{.Poster.HomeLink}}">{{.Poster.GetDisplayName}}</a>
{{template "shared/user/authorlink" .Poster}}
{{if eq .Type 34}}{{$.i18n.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr | Safe}}
{{else}}{{$.i18n.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr | Safe}}{{end}}
</span>

View File

@ -0,0 +1,3 @@
<a class="author"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
{{.GetDisplayName}}
</a>

View File

@ -0,0 +1,3 @@
<a class="avatar"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
{{avatar .}}
</a>

View File

@ -0,0 +1,3 @@
<a{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
{{.GetDisplayName}}
</a>