summaryrefslogtreecommitdiffstats
path: root/templates/repo/actions/runs_list.tmpl
diff options
context:
space:
mode:
authorJason Song <i@wolfogre.com>2023-02-01 06:45:25 +0800
committerGitHub <noreply@github.com>2023-01-31 22:45:25 +0000
commit707ecec71514fbadb09bdbe915129a9badf0755c (patch)
tree239cba72647fb1745e6d1f8aec22bf96500124eb /templates/repo/actions/runs_list.tmpl
parentfd29071e5760e740a533b4f876aef761fdc7ffde (diff)
downloadgitea-707ecec71514fbadb09bdbe915129a9badf0755c.tar.gz
gitea-707ecec71514fbadb09bdbe915129a9badf0755c.zip
Fix ref to trigger Actions (#22679)
If triggered by PR, the ref should be `pull/<index>/head` instead of `repo.DefaultBranch`. And improve UI: <img width="493" alt="image" src="https://user-images.githubusercontent.com/9418365/215731280-312564f2-2450-45d0-b986-1accb0670976.png"> Related to #21937.
Diffstat (limited to 'templates/repo/actions/runs_list.tmpl')
-rw-r--r--templates/repo/actions/runs_list.tmpl9
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/repo/actions/runs_list.tmpl b/templates/repo/actions/runs_list.tmpl
index 2e2e037de0..d3eb12430f 100644
--- a/templates/repo/actions/runs_list.tmpl
+++ b/templates/repo/actions/runs_list.tmpl
@@ -7,8 +7,15 @@
<div class="issue-item-main f1 fc df">
<div class="issue-item-top-row">
<a class="index ml-0 mr-2" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
- {{.Title}} <span class="ui label">{{RefShortName .Ref}}</span>
+ {{.Title}}
</a>
+ <span class="ui label">
+ {{if .RefLink}}
+ <a href="{{.RefLink}}">{{.PrettyRef}}</a>
+ {{else}}
+ {{.PrettyRef}}
+ {{end}}
+ </span>
</div>
<div class="desc issue-item-bottom-row df ac fw my-1">
<b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>: {{$.locale.Tr "actions.runs.commit"}}