0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-05-08 01:34:08 +02:00

Fix commit title rendering in action run and blame (#37243) (#37251)

Backport #37243 by @silverwind

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
This commit is contained in:
Giteabot 2026-04-17 21:25:42 +08:00 committed by GitHub
parent 5d852d2d0a
commit 4de12baf9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View File

@ -11,9 +11,13 @@
{{template "repo/actions/status" (dict "status" $run.Status.String)}}
</div>
<div class="flex-item-main">
<a class="flex-item-title" title="{{$run.Title}}" href="{{$run.Link}}">
{{or $run.Title (ctx.Locale.Tr "actions.runs.empty_commit_message")}}
</a>
<span class="flex-item-title" title="{{$run.Title}}">
{{if $run.Title}}
{{ctx.RenderUtils.RenderCommitMessageLinkSubject $run.Title $run.Link $.Repository}}
{{else}}
<a href="{{$run.Link}}">{{ctx.Locale.Tr "actions.runs.empty_commit_message"}}</a>
{{end}}
</span>
<div class="flex-item-body">
<span><b>{{if not $.CurWorkflow}}{{$run.WorkflowID}} {{end}}#{{$run.Index}}</b>:</span>

View File

@ -45,10 +45,8 @@
<div class="blame-avatar">
{{$row.Avatar}}
</div>
<div class="blame-message">
<a class="suppressed tw-text-text" href="{{$row.CommitURL}}" title="{{$row.CommitMessage}}">
{{$row.CommitMessage}}
</a>
<div class="blame-message muted-links" title="{{$row.CommitMessage}}">
{{ctx.RenderUtils.RenderCommitMessageLinkSubject $row.CommitMessage $row.CommitURL $.Repository}}
</div>
<div class="blame-time not-mobile">
{{$row.CommitSince}}