From 864bdd0ac8a597eaed5c59b31979a160b776ee2b Mon Sep 17 00:00:00 2001 From: Giteabot Date: Wed, 19 Jul 2023 02:43:41 -0400 Subject: [PATCH] Make pending commit status yellow again (#25935) (#25968) Backport #25935 by @silverwind With the introduction of Actions, the pending commit icon has changed from yellow to grey for Drone integrations which never set the "running" status, so it stays in "pending" until completion. I find it better to have this icon colored like on 1.19. Now both the "pending" and "running" icons look the same, but I guess we could add an animation to the "running" state similar to GitHub has to it later. Before: Screenshot 2023-07-17 at 19 14 19 After: Screenshot 2023-07-17 at 19 14 30 Also, it matches GH's icon: image Co-authored-by: silverwind Co-authored-by: delvh --- templates/repo/commit_status.tmpl | 5 +---- tests/integration/repo_commits_test.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/templates/repo/commit_status.tmpl b/templates/repo/commit_status.tmpl index d52e151247af..6a01b9f342c6 100644 --- a/templates/repo/commit_status.tmpl +++ b/templates/repo/commit_status.tmpl @@ -1,7 +1,4 @@ -{{if eq .State "pending"}} - {{svg "octicon-dot-fill" 18 "commit-status icon text grey"}} -{{end}} -{{if eq .State "running"}} +{{if or (eq .State "pending") (eq .State "running")}} {{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}} {{end}} {{if eq .State "success"}} diff --git a/tests/integration/repo_commits_test.go b/tests/integration/repo_commits_test.go index 5f580a0268d5..9a9836a16fee 100644 --- a/tests/integration/repo_commits_test.go +++ b/tests/integration/repo_commits_test.go @@ -110,7 +110,7 @@ func testRepoCommitsWithStatus(t *testing.T, resp, respOne *httptest.ResponseRec } func TestRepoCommitsWithStatusPending(t *testing.T) { - doTestRepoCommitWithStatus(t, "pending", "octicon-dot-fill", "grey") + doTestRepoCommitWithStatus(t, "pending", "octicon-dot-fill", "yellow") } func TestRepoCommitsWithStatusSuccess(t *testing.T) {