]> source.dussan.org Git - gitea.git/commitdiff
Fix empty action run title (#28113)
authorLunny Xiao <xiaolunwen@gmail.com>
Tue, 21 Nov 2023 03:00:59 +0000 (11:00 +0800)
committerGitHub <noreply@github.com>
Tue, 21 Nov 2023 03:00:59 +0000 (03:00 +0000)
Fix #27901

options/locale/locale_en-US.ini
templates/repo/actions/runs_list.tmpl

index ee5ae7467aa4a2e02660d9187f941c1441350e18..293316fc7b92334763299028ea2ed72fd76515ff 100644 (file)
@@ -3530,6 +3530,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>: