mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Replace list.List
with slices (#16311)
* Replaced list with slice. * Fixed usage of pointer to temporary variable. * Replaced LIFO list with slice. * Lint * Removed type check. * Removed duplicated code. * Lint * Fixed merge. Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -89,17 +89,15 @@
|
||||
<ul>
|
||||
{{ $push := ActionContent2Commits .}}
|
||||
{{ $repoLink := .GetRepoLink}}
|
||||
{{if $push.Commits}}
|
||||
{{range $push.Commits}}
|
||||
{{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
<li>
|
||||
{{avatarHTML ($push.AvatarLink .AuthorEmail) 16 "mr-2" .AuthorName}}
|
||||
<a class="commit-id mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
||||
<span class="text truncate light grey">
|
||||
{{RenderCommitMessage .Message $repoLink $.ComposeMetas}}
|
||||
</span>
|
||||
</li>
|
||||
{{end}}
|
||||
{{range $push.Commits}}
|
||||
{{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
<li>
|
||||
{{avatarHTML ($push.AvatarLink .AuthorEmail) 16 "mr-2" .AuthorName}}
|
||||
<a class="commit-id mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
||||
<span class="text truncate light grey">
|
||||
{{RenderCommitMessage .Message $repoLink $.ComposeMetas}}
|
||||
</span>
|
||||
</li>
|
||||
{{end}}
|
||||
{{if and (gt (len $push.Commits) 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.i18n.Tr "action.compare_commits" (len $push.Commits)}} »</a></li>{{end}}
|
||||
</ul>
|
||||
|
Reference in New Issue
Block a user