2024-12-25 00:51:13 +08:00
|
|
|
{{/* Template Attributes:
|
2023-11-02 23:49:02 +09:00
|
|
|
* CommitStatus: summary of all commit status state
|
|
|
|
|
* CommitStatuses: all commit status elements
|
|
|
|
|
* ShowHideChecks: whether use a button to show/hide the checks
|
2025-10-20 04:46:37 -06:00
|
|
|
* StatusCheckData: additional status check data, see backend pullCommitStatusCheckData struct
|
2023-11-02 23:49:02 +09:00
|
|
|
*/}}
|
2025-10-20 04:46:37 -06:00
|
|
|
{{$statusCheckData := .StatusCheckData}}
|
2023-11-02 23:49:02 +09:00
|
|
|
{{if .CommitStatus}}
|
|
|
|
|
<div class="commit-status-panel">
|
|
|
|
|
<div class="ui top attached header commit-status-header">
|
2026-01-15 09:25:14 +11:00
|
|
|
{{$statusCheckData.CommitStatusCheckPrompt ctx.Locale}}
|
2019-06-30 15:57:59 +08:00
|
|
|
|
2023-11-02 23:49:02 +09:00
|
|
|
{{if .ShowHideChecks}}
|
|
|
|
|
<div class="ui right">
|
|
|
|
|
<button class="commit-status-hide-checks btn interact-fg"
|
|
|
|
|
data-show-all="{{ctx.Locale.Tr "repo.pulls.status_checks_show_all"}}"
|
|
|
|
|
data-hide-all="{{ctx.Locale.Tr "repo.pulls.status_checks_hide_all"}}">
|
|
|
|
|
{{ctx.Locale.Tr "repo.pulls.status_checks_hide_all"}}</button>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-10-20 04:46:37 -06:00
|
|
|
{{if and $statusCheckData $statusCheckData.RequireApprovalRunCount}}
|
|
|
|
|
<div class="ui attached segment flex-text-block tw-justify-between" id="approve-status-checks">
|
|
|
|
|
<div>
|
|
|
|
|
<strong>
|
|
|
|
|
{{ctx.Locale.Tr "repo.pulls.status_checks_need_approvals" $statusCheckData.RequireApprovalRunCount}}
|
|
|
|
|
</strong>
|
|
|
|
|
<p>{{ctx.Locale.Tr "repo.pulls.status_checks_need_approvals_helper"}}</p>
|
|
|
|
|
</div>
|
|
|
|
|
{{if $statusCheckData.CanApprove}}
|
|
|
|
|
<button class="ui basic button link-action" data-url="{{$statusCheckData.ApproveLink}}">
|
|
|
|
|
{{ctx.Locale.Tr "repo.pulls.status_checks_approve_all"}}
|
|
|
|
|
</button>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
|
|
|
|
|
2023-11-02 23:49:02 +09:00
|
|
|
<div class="commit-status-list">
|
|
|
|
|
{{range .CommitStatuses}}
|
|
|
|
|
<div class="commit-status-item">
|
|
|
|
|
{{template "repo/commit_status" .}}
|
2026-02-22 23:56:33 +01:00
|
|
|
<div class="status-context gt-ellipsis">{{.Context}} <span class="tw-text-text-light-2">{{.Description}}</span></div>
|
2022-10-28 15:49:42 +02:00
|
|
|
<div class="ui status-details">
|
2025-10-20 04:46:37 -06:00
|
|
|
{{if and $statusCheckData $statusCheckData.IsContextRequired}}
|
|
|
|
|
{{if (call $statusCheckData.IsContextRequired .Context)}}<div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
|
2022-10-28 15:49:42 +02:00
|
|
|
{{end}}
|
2023-09-25 10:56:50 +02:00
|
|
|
<span>{{if .TargetURL}}<a href="{{.TargetURL}}">{{ctx.Locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
|
2022-10-28 15:49:42 +02:00
|
|
|
</div>
|
2021-04-11 05:46:37 +02:00
|
|
|
</div>
|
2023-11-02 23:49:02 +09:00
|
|
|
{{end}}
|
2025-10-20 04:46:37 -06:00
|
|
|
{{if $statusCheckData}}
|
|
|
|
|
{{range $statusCheckData.MissingRequiredChecks}}
|
|
|
|
|
<div class="commit-status-item">
|
2026-02-22 23:56:33 +01:00
|
|
|
{{svg "octicon-dot-fill" 18 "commit-status icon tw-text-yellow"}}
|
2025-10-20 04:46:37 -06:00
|
|
|
<div class="status-context gt-ellipsis">{{.}}</div>
|
|
|
|
|
<div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
{{end}}
|
2024-02-19 10:57:08 +01:00
|
|
|
{{end}}
|
2023-11-02 23:49:02 +09:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2019-09-18 13:39:45 +08:00
|
|
|
{{end}}
|