2022-08-25 23:55:52 +02:00
|
|
|
{{$index := 0}}
|
2020-05-24 00:05:20 +02:00
|
|
|
<div class="timeline-item commits-list">
|
2021-08-09 20:08:51 +02:00
|
|
|
{{range .comment.Commits}}
|
2022-08-25 23:55:52 +02:00
|
|
|
{{$tag := printf "%s-%d" $.comment.HashTag $index}}
|
2023-04-07 21:25:49 +08:00
|
|
|
{{$index = Eval $index "+" 1}}
|
2024-12-27 21:18:30 +01:00
|
|
|
<div class="flex-text-block" id="{{$tag}}">{{/*singular-commit*/}}
|
2020-09-11 22:19:00 +02:00
|
|
|
<span class="badge badge-commit">{{svg "octicon-git-commit"}}</span>
|
2020-05-20 20:47:24 +08:00
|
|
|
{{if .User}}
|
2024-04-17 10:58:08 +02:00
|
|
|
<a class="avatar" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20}}</a>
|
2020-05-20 20:47:24 +08:00
|
|
|
{{else}}
|
2024-04-17 10:58:08 +02:00
|
|
|
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 20}}
|
2020-05-20 20:47:24 +08:00
|
|
|
{{end}}
|
|
|
|
|
|
2024-12-27 21:18:30 +01:00
|
|
|
{{$commitBaseLink := printf "%s/commit" $.comment.Issue.PullRequest.BaseRepo.Link}}
|
|
|
|
|
{{$commitLink:= printf "%s/%s" $commitBaseLink (PathEscape .ID.String)}}
|
2023-03-27 22:44:51 +08:00
|
|
|
|
2024-05-10 20:58:05 +08:00
|
|
|
<span class="tw-flex-1 tw-font-mono gt-ellipsis" title="{{.Summary}}">
|
2025-05-09 20:42:35 +08:00
|
|
|
{{- ctx.RenderUtils.RenderCommitMessageLinkSubject .Message $commitLink $.comment.Issue.PullRequest.BaseRepo -}}
|
2024-05-10 20:58:05 +08:00
|
|
|
</span>
|
2024-04-17 10:58:08 +02:00
|
|
|
|
|
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
2024-05-10 20:58:05 +08:00
|
|
|
<button class="ui button ellipsis-button show-panel toggle" data-panel="[data-singular-commit-body-for='{{$tag}}']">...</button>
|
2024-04-17 10:58:08 +02:00
|
|
|
{{end}}
|
|
|
|
|
|
2025-07-13 22:52:35 +08:00
|
|
|
<span class="flex-text-block">
|
2023-11-02 23:49:02 +09:00
|
|
|
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
|
2024-12-27 21:18:30 +01:00
|
|
|
{{template "repo/commit_sign_badge" dict "Commit" . "CommitBaseLink" $commitBaseLink "CommitSignVerification" .Verification}}
|
2020-05-20 20:47:24 +08:00
|
|
|
</span>
|
|
|
|
|
</div>
|
2024-05-10 20:58:05 +08:00
|
|
|
{{if IsMultilineCommitMessage .Message}}
|
|
|
|
|
<pre class="commit-body tw-ml-[33px] tw-hidden" data-singular-commit-body-for="{{$tag}}">
|
2025-05-09 20:42:35 +08:00
|
|
|
{{- ctx.RenderUtils.RenderCommitBody .Message $.comment.Issue.PullRequest.BaseRepo -}}
|
2024-05-10 20:58:05 +08:00
|
|
|
</pre>
|
|
|
|
|
{{end}}
|
2020-05-20 20:47:24 +08:00
|
|
|
{{end}}
|
2020-05-24 00:05:20 +02:00
|
|
|
</div>
|