|
1 | | -{{if $.LatestCommitStatus}} |
2 | | - {{if not $.Issue.PullRequest.HasMerged}} |
3 | | - <div class="ui top attached header"> |
4 | | - {{if eq .LatestCommitStatus.State "pending"}} |
5 | | - {{$.locale.Tr "repo.pulls.status_checking"}} |
6 | | - {{else if eq .LatestCommitStatus.State "success"}} |
7 | | - {{$.locale.Tr "repo.pulls.status_checks_success"}} |
8 | | - {{else if eq .LatestCommitStatus.State "warning"}} |
9 | | - {{$.locale.Tr "repo.pulls.status_checks_warning"}} |
10 | | - {{else if eq .LatestCommitStatus.State "failure"}} |
11 | | - {{$.locale.Tr "repo.pulls.status_checks_failure"}} |
12 | | - {{else if eq .LatestCommitStatus.State "error"}} |
13 | | - {{$.locale.Tr "repo.pulls.status_checks_error"}} |
14 | | - {{else}} |
15 | | - {{$.locale.Tr "repo.pulls.status_checking"}} |
16 | | - {{end}} |
17 | | - <div class="ui right"> |
18 | | - <a class="hide-all-checks muted" |
19 | | - data-show-all="{{$.locale.Tr "repo.pulls.status_checks_show_all"}}" |
20 | | - data-hide-all="{{$.locale.Tr "repo.pulls.status_checks_hide_all"}}"> |
21 | | - {{$.locale.Tr "repo.pulls.status_checks_hide_all"}}</a> |
22 | | - </div> |
| 1 | +{{/* |
| 2 | +Template Attributes: |
| 3 | +* locale: passed through for localization |
| 4 | +* CommitStatus: summary of all commit status state |
| 5 | +* CommitStatuses: all commit status elements |
| 6 | +* IsTippy: whether this template is the content of tippy |
| 7 | +* is_context_required: Used in pull request commit status check table |
| 8 | +*/}} |
| 9 | + |
| 10 | +{{if .CommitStatus}} |
| 11 | +<div class="{{if .IsTippy}}tippy-commit-status{{else}}pr-commit-status{{end}}"> |
| 12 | + <div class="ui attached header top"> |
| 13 | + {{if eq .CommitStatus.State "pending"}} |
| 14 | + {{.locale.Tr "repo.pulls.status_checking"}} |
| 15 | + {{else if eq .CommitStatus.State "success"}} |
| 16 | + {{.locale.Tr "repo.pulls.status_checks_success"}} |
| 17 | + {{else if eq .CommitStatus.State "warning"}} |
| 18 | + {{.locale.Tr "repo.pulls.status_checks_warning"}} |
| 19 | + {{else if eq .CommitStatus.State "failure"}} |
| 20 | + {{.locale.Tr "repo.pulls.status_checks_failure"}} |
| 21 | + {{else if eq .CommitStatus.State "error"}} |
| 22 | + {{.locale.Tr "repo.pulls.status_checks_error"}} |
| 23 | + {{else}} |
| 24 | + {{.locale.Tr "repo.pulls.status_checking"}} |
| 25 | + {{end}} |
| 26 | + |
| 27 | + {{if not .IsTippy}} |
| 28 | + <div class="ui right"> |
| 29 | + <a class="hide-all-checks muted" |
| 30 | + data-show-all="{{.locale.Tr "repo.pulls.status_checks_show_all"}}" |
| 31 | + data-hide-all="{{.locale.Tr "repo.pulls.status_checks_hide_all"}}"> |
| 32 | + {{.locale.Tr "repo.pulls.status_checks_hide_all"}}</a> |
23 | 33 | </div> |
24 | | - {{end}} |
| 34 | + {{end}} |
| 35 | + </div> |
25 | 36 |
|
26 | | - <div class="ui attached segment pr-status-list"> |
27 | | - {{range $.LatestCommitStatuses}} |
28 | | - <div class="ui attached segment pr-status"> |
| 37 | + <div class="ui attached segment commit-status-list"> |
| 38 | + {{range .CommitStatuses}} |
| 39 | + <div class="ui attached segment commit-status-item"> |
29 | 40 | {{template "repo/commit_status" .}} |
30 | 41 | <div class="status-context"> |
31 | 42 | <span>{{.Context}} <span class="text grey">{{.Description}}</span></span> |
|
39 | 50 | </div> |
40 | 51 | {{end}} |
41 | 52 | </div> |
| 53 | +</div> |
42 | 54 | {{end}} |
0 commit comments