|
5 | 5 | <h2>{{if $.IsFiltered}}{{ctx.Locale.Tr "actions.runs.no_results"}}{{else}}{{ctx.Locale.Tr "actions.runs.no_runs"}}{{end}}</h2>
|
6 | 6 | </div>
|
7 | 7 | {{end}}
|
8 |
| - {{range .Runs}} |
| 8 | + {{range $run := .Runs}} |
9 | 9 | <div class="flex-item tw-items-center">
|
10 | 10 | <div class="flex-item-leading">
|
11 |
| - {{template "repo/actions/status" (dict "status" .Status.String)}} |
| 11 | + {{template "repo/actions/status" (dict "status" $run.Status.String)}} |
12 | 12 | </div>
|
13 | 13 | <div class="flex-item-main">
|
14 |
| - <a class="flex-item-title" title="{{.Title}}" href="{{.Link}}"> |
15 |
| - {{if .Title}}{{.Title}}{{else}}{{ctx.Locale.Tr "actions.runs.empty_commit_message"}}{{end}} |
| 14 | + <a class="flex-item-title" title="{{$run.Title}}" href="{{$run.Link}}"> |
| 15 | + {{or $run.Title (ctx.Locale.Tr "actions.runs.empty_commit_message")}} |
16 | 16 | </a>
|
17 | 17 | <div class="flex-item-body">
|
18 |
| - <span><b>{{if not $.CurWorkflow}}{{.WorkflowID}} {{end}}#{{.Index}}</b>:</span> |
19 |
| - {{- if .ScheduleID -}} |
| 18 | + <span><b>{{if not $.CurWorkflow}}{{$run.WorkflowID}} {{end}}#{{$run.Index}}</b>:</span> |
| 19 | + {{- if $run.ScheduleID -}} |
20 | 20 | {{ctx.Locale.Tr "actions.runs.scheduled"}}
|
21 | 21 | {{- else -}}
|
22 | 22 | {{ctx.Locale.Tr "actions.runs.commit"}}
|
23 |
| - <a href="{{$.RepoLink}}/commit/{{.CommitSHA}}">{{ShortSha .CommitSHA}}</a> |
| 23 | + <a href="{{$.RepoLink}}/commit/{{$run.CommitSHA}}">{{ShortSha $run.CommitSHA}}</a> |
24 | 24 | {{ctx.Locale.Tr "actions.runs.pushed_by"}}
|
25 |
| - <a href="{{.TriggerUser.HomeLink}}">{{.TriggerUser.GetDisplayName}}</a> |
| 25 | + <a href="{{$run.TriggerUser.HomeLink}}">{{$run.TriggerUser.GetDisplayName}}</a> |
26 | 26 | {{- end -}}
|
27 | 27 | </div>
|
28 | 28 | </div>
|
29 | 29 | <div class="flex-item-trailing">
|
30 |
| - {{if .IsRefDeleted}} |
31 |
| - <span class="ui label run-list-ref gt-ellipsis tw-line-through" data-tooltip-content="{{.PrettyRef}}">{{.PrettyRef}}</span> |
| 30 | + {{if $run.IsRefDeleted}} |
| 31 | + <span class="ui label run-list-ref gt-ellipsis tw-line-through" data-tooltip-content="{{$run.PrettyRef}}">{{$run.PrettyRef}}</span> |
32 | 32 | {{else}}
|
33 |
| - <a class="ui label run-list-ref gt-ellipsis" href="{{.RefLink}}" data-tooltip-content="{{.PrettyRef}}">{{.PrettyRef}}</a> |
| 33 | + <a class="ui label run-list-ref gt-ellipsis" href="{{$run.RefLink}}" data-tooltip-content="{{$run.PrettyRef}}">{{$run.PrettyRef}}</a> |
34 | 34 | {{end}}
|
35 | 35 | <div class="run-list-item-right">
|
36 |
| - <div class="run-list-meta">{{svg "octicon-calendar" 16}}{{DateUtils.TimeSince .Updated}}</div> |
37 |
| - <div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{.Duration}}</div> |
| 36 | + <div class="run-list-meta">{{svg "octicon-calendar" 16}}{{DateUtils.TimeSince $run.Updated}}</div> |
| 37 | + <div class="run-list-meta">{{svg "octicon-stopwatch" 16}}{{$run.Duration}}</div> |
38 | 38 | </div>
|
39 |
| - {{if and ($.AllowDeleteWorkflowRuns) (.Status.IsDone)}} |
40 |
| - <button class="ui btn interact-bg link-action tw-p-2" |
41 |
| - data-url="{{.Link}}/delete" |
| 39 | + {{if and ($.AllowDeleteWorkflowRuns) ($run.Status.IsDone)}} |
| 40 | + <button class="btn interact-bg link-action tw-p-2" |
| 41 | + data-url="{{$run.Link}}/delete" |
42 | 42 | data-modal-confirm="{{ctx.Locale.Tr "actions.runs.delete.description"}}"
|
43 | 43 | data-tooltip-content="{{ctx.Locale.Tr "actions.runs.delete"}}"
|
44 | 44 | >
|
|
0 commit comments