]> source.dussan.org Git - gitea.git/commitdiff
Fix empty action run title (#28113) (#28148)
authorGiteabot <teabot@gitea.io>
Tue, 21 Nov 2023 04:28:14 +0000 (12:28 +0800)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2023 04:28:14 +0000 (04:28 +0000)
Backport #28113 by @lunny

Fix #27901

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
options/locale/locale_en-US.ini
templates/repo/actions/runs_list.tmpl

index 3d9181d024eca0ba26b8dcb74c22d6c5117803aa..36fc65200e1b1b97e7f1b2607b3c1f927787dffc 100644 (file)
@@ -3527,6 +3527,7 @@ runs.actors_no_select = All actors
 runs.status_no_select = All status
 runs.no_results = No results matched.
 runs.no_runs = The workflow has no runs yet.
+runs.empty_commit_message = (empty commit message)
 
 workflow.disable = Disable Workflow
 workflow.disable_success = Workflow '%s' disabled successfully.
index b3469a2edc3ed39515354081e1e1ed4713f293a3..3b289fb68f2ea12bee7e2ee924d623afedbf33ac 100644 (file)
@@ -12,7 +12,7 @@
                        </div>
                        <div class="flex-item-main">
                                <a class="flex-item-title" title="{{.Title}}" href="{{if .Link}}{{.Link}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
-                                       {{- .Title -}}
+                                       {{if .Title}}{{.Title}}{{else}}{{ctx.Locale.Tr "actions.runs.empty_commit_message"}}{{end}}
                                </a>
                                <div class="flex-item-body">
                                        <b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>: