Skip to content

Commit 7df036f

Browse files
authored
Use different SVG for pending and running actions (#23836)
Before: <img width="641" alt="截屏2023-03-31 11 12 17" src="https://user-images.githubusercontent.com/17645053/229013472-237701db-2c30-4477-a7b5-d40640361b14.png"> <img width="576" alt="截屏2023-03-31 11 10 48" src="https://user-images.githubusercontent.com/17645053/229013535-571aa8be-8e58-4d93-8641-9b8b5fd90108.png"> After: <img width="709" alt="截屏2023-03-31 11 05 44" src="https://user-images.githubusercontent.com/17645053/229012963-ccd1e9a7-8bea-4197-aa36-865eafbf8858.png"> <img width="528" alt="截屏2023-03-31 11 06 56" src="https://user-images.githubusercontent.com/17645053/229012971-a7313eb6-ecd2-4da3-89a7-c20be33f4611.png">
1 parent ca03ca9 commit 7df036f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

templates/repo/commit_status.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{if eq .State "pending"}}
2-
{{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}}
2+
{{svg "octicon-dot-fill" 18 "commit-status icon text grey"}}
33
{{end}}
44
{{if eq .State "running"}}
55
{{svg "octicon-dot-fill" 18 "commit-status icon text yellow"}}

tests/integration/repo_commits_test.go

+5-1
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", "yellow")
113+
doTestRepoCommitWithStatus(t, "pending", "octicon-dot-fill", "grey")
114114
}
115115

116116
func TestRepoCommitsWithStatusSuccess(t *testing.T) {
@@ -129,6 +129,10 @@ func TestRepoCommitsWithStatusWarning(t *testing.T) {
129129
doTestRepoCommitWithStatus(t, "warning", "gitea-exclamation", "yellow")
130130
}
131131

132+
func TestRepoCommitsWithStatusRunning(t *testing.T) {
133+
doTestRepoCommitWithStatus(t, "running", "octicon-dot-fill", "yellow")
134+
}
135+
132136
func TestRepoCommitsStatusParallel(t *testing.T) {
133137
defer tests.PrepareTestEnv(t)()
134138

0 commit comments

Comments
 (0)