Skip to content

Commit 864bdd0

Browse files
GiteaBotsilverwinddelvh
authored
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: <img width="339" alt="Screenshot 2023-07-17 at 19 14 19" src="https://github.com/go-gitea/gitea/assets/115237/2f4886e4-74fd-42ea-b59e-9af8f141bf1f"> After: <img width="335" alt="Screenshot 2023-07-17 at 19 14 30" src="https://github.com/go-gitea/gitea/assets/115237/53189642-e72d-47f6-9cbe-f14eda28f730"> Also, it matches GH's icon: <img width="466" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/5804ff90-d223-4a3c-8093-7a9abbaacf87"> Co-authored-by: silverwind <[email protected]> Co-authored-by: delvh <[email protected]>
1 parent 037a3f0 commit 864bdd0

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

templates/repo/commit_status.tmpl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
{{if eq .State "pending"}}
2-
{{svg "octicon-dot-fill" 18 "commit-status icon text grey"}}
3-
{{end}}
4-
{{if eq .State "running"}}
1+
{{if or (eq .State "pending") (eq .State "running")}}
52
{{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}}
63
{{end}}
74
{{if eq .State "success"}}

tests/integration/repo_commits_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func testRepoCommitsWithStatus(t *testing.T, resp, respOne *httptest.ResponseRec
110110
}
111111

112112
func TestRepoCommitsWithStatusPending(t *testing.T) {
113-
doTestRepoCommitWithStatus(t, "pending", "octicon-dot-fill", "grey")
113+
doTestRepoCommitWithStatus(t, "pending", "octicon-dot-fill", "yellow")
114114
}
115115

116116
func TestRepoCommitsWithStatusSuccess(t *testing.T) {

0 commit comments

Comments
 (0)