summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorGiteabot <teabot@gitea.io>2023-10-09 11:56:02 +0800
committerGitHub <noreply@github.com>2023-10-09 11:56:02 +0800
commitfb5ae2ab94948eea39b39597eb7a3bcb9f4307e1 (patch)
tree017bed2f007d5d0f38084d8c478dec5e2e627dca /templates/repo
parent8419897fbac7e87a1866e111222a076848cf582f (diff)
downloadgitea-fb5ae2ab94948eea39b39597eb7a3bcb9f4307e1.tar.gz
gitea-fb5ae2ab94948eea39b39597eb7a3bcb9f4307e1.zip
Restore warning commit status (#27504) (#27529)
Backport #27504 by @silverwind Partial revert of https://github.com/go-gitea/gitea/pull/25839. This commit status is used by a number of external integrations, so I think we should not remove it (See https://github.com/go-gitea/gitea/pull/25839#issuecomment-1729002077). This is a rare case where an existing migration needed to be alterted to avoid data loss. Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/commit_status.tmpl3
-rw-r--r--templates/repo/issue/view_content/pull.tmpl2
2 files changed, 4 insertions, 1 deletions
diff --git a/templates/repo/commit_status.tmpl b/templates/repo/commit_status.tmpl
index ebd8a55f65..eb700ab2bb 100644
--- a/templates/repo/commit_status.tmpl
+++ b/templates/repo/commit_status.tmpl
@@ -11,3 +11,6 @@
{{if eq .State "failure"}}
{{svg "octicon-x" 18 "commit-status icon text red"}}
{{end}}
+{{if eq .State "warning"}}
+ {{svg "gitea-exclamation" 18 "commit-status icon text yellow"}}
+{{end}}
diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl
index f9a43d7dbe..409af3a5d5 100644
--- a/templates/repo/issue/view_content/pull.tmpl
+++ b/templates/repo/issue/view_content/pull.tmpl
@@ -13,7 +13,7 @@
{{- else if .IsBlockedByOutdatedBranch}}red
{{- else if .IsBlockedByChangedProtectedFiles}}red
{{- else if and .EnableStatusCheck (or .RequiredStatusCheckState.IsFailure .RequiredStatusCheckState.IsError)}}red
- {{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending)}}yellow
+ {{- else if and .EnableStatusCheck (or (not $.LatestCommitStatus) .RequiredStatusCheckState.IsPending .RequiredStatusCheckState.IsWarning)}}yellow
{{- else if and .AllowMerge .RequireSigned (not .WillSign)}}red
{{- else if .Issue.PullRequest.IsChecking}}yellow
{{- else if .Issue.PullRequest.IsEmpty}}grey