1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00
gitea/templates/repo/actions/runs_list.tmpl
Jason Song 707ecec715
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.
2023-01-31 22:45:25 +00:00

33 lines
1.1 KiB
Handlebars

<div class="issue list">
{{range .Runs}}
<li class="item df py-3">
<div class="issue-item-left df">
{{template "repo/actions/status" .Status}}
</div>
<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}}
</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"}}
<a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a>&nbsp; {{$.locale.Tr "actions.runs.pushed_by"}} {{.TriggerUser.GetDisplayName | Escape}}
</div>
</div>
<div class="issue-item-right">
<div>{{TimeSinceUnix .Updated $.locale}}</div>
<div>{{.Duration}}</div>
</div>
</li>
{{end}}
</div>
{{template "base/paginate" .}}