From dcb607d3cff2cb8de5632e77a886d59e620a07b9 Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 18 Jul 2023 18:59:02 +0200 Subject: [PATCH] Make pending commit status yellow again (#25935) 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: 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) {