Skip to content

Commit 9f0a12f

Browse files
Thomas StrombergThomas Stromberg
authored andcommitted
use go1.24, add cockroach
1 parent 3b814a3 commit 9f0a12f

File tree

6 files changed

+48
-17
lines changed

6 files changed

+48
-17
lines changed

cmd/goose/icons.go

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ import (
1212
type IconType int
1313

1414
const (
15-
IconSmiling IconType = iota // No blocked PRs
16-
IconGoose // Incoming PRs blocked
17-
IconPopper // Outgoing PRs blocked
18-
IconBoth // Both incoming and outgoing blocked
19-
IconWarning // General error/warning
20-
IconLock // Authentication error
15+
IconSmiling IconType = iota // No blocked PRs
16+
IconGoose // Incoming PRs blocked
17+
IconPopper // Outgoing PRs blocked
18+
IconCockroach // Outgoing PRs blocked (fix_tests only)
19+
IconBoth // Both incoming and outgoing blocked
20+
IconWarning // General error/warning
21+
IconLock // Authentication error
2122
)
2223

2324
// getIcon returns the icon bytes for the given type.
@@ -27,6 +28,8 @@ func getIcon(iconType IconType) []byte {
2728
return iconGoose
2829
case IconPopper:
2930
return iconPopper
31+
case IconCockroach:
32+
return iconCockroach
3033
case IconSmiling:
3134
return iconSmiling
3235
case IconWarning:

cmd/goose/icons_unix.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ var iconLock []byte
2222

2323
//go:embed icons/warning.png
2424
var iconWarning []byte
25+
26+
//go:embed icons/cockroach.png
27+
var iconCockroach []byte

cmd/goose/icons_windows.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@ var iconSmiling []byte
2020
//go:embed icons/warning.ico
2121
var iconWarning []byte
2222

23+
//go:embed icons/cockroach.ico
24+
var iconCockroach []byte
25+
2326
// lock.ico not yet created, using warning as fallback
24-
var iconLock = iconWarning
27+
var iconLock = iconWarning

cmd/goose/ui.go

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,21 @@ func (app *App) countPRs() PRCounts {
190190
func (app *App) setTrayTitle() {
191191
counts := app.countPRs()
192192

193+
// Check if all outgoing blocked PRs are fix_tests only
194+
allOutgoingAreFixTests := false
195+
if counts.OutgoingBlocked > 0 && counts.IncomingBlocked == 0 {
196+
app.mu.RLock()
197+
allFixTests := true
198+
for i := range app.outgoing {
199+
if app.outgoing[i].IsBlocked && app.outgoing[i].ActionKind != "fix_tests" {
200+
allFixTests = false
201+
break
202+
}
203+
}
204+
app.mu.RUnlock()
205+
allOutgoingAreFixTests = allFixTests
206+
}
207+
193208
// Set title and icon based on PR state
194209
var title string
195210
var iconType IconType
@@ -210,7 +225,11 @@ func (app *App) setTrayTitle() {
210225
iconType = IconGoose
211226
default:
212227
title = fmt.Sprintf("%d", counts.OutgoingBlocked)
213-
iconType = IconPopper
228+
if allOutgoingAreFixTests {
229+
iconType = IconCockroach
230+
} else {
231+
iconType = IconPopper
232+
}
214233
}
215234
} else {
216235
// All other platforms: icon only, no text
@@ -223,7 +242,11 @@ func (app *App) setTrayTitle() {
223242
case counts.IncomingBlocked > 0:
224243
iconType = IconGoose
225244
default:
226-
iconType = IconPopper
245+
if allOutgoingAreFixTests {
246+
iconType = IconCockroach
247+
} else {
248+
iconType = IconPopper
249+
}
227250
}
228251
}
229252

go.mod

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
module github.com/ready-to-review/goose
1+
module github.com/codeGROOVE-dev/goose
22

3-
go 1.25.1
3+
go 1.24.0
44

55
require (
66
github.com/codeGROOVE-dev/retry v1.2.0
77
github.com/codeGROOVE-dev/sprinkler v0.0.0-20251001154245-068712aa969d
8-
github.com/codeGROOVE-dev/turnclient v0.0.0-20251001151440-a58eb9b17826
8+
github.com/codeGROOVE-dev/turnclient v0.0.0-20251001194229-2aaea2e63cc7
99
github.com/energye/systray v1.0.2
1010
github.com/gen2brain/beeep v0.11.1
1111
github.com/google/go-github/v57 v57.0.0
@@ -18,7 +18,6 @@ require (
1818
github.com/esiqveland/notify v0.13.3 // indirect
1919
github.com/go-ole/go-ole v1.3.0 // indirect
2020
github.com/godbus/dbus/v5 v5.1.0 // indirect
21-
github.com/google/go-cmp v0.7.0 // indirect
2221
github.com/google/go-querystring v1.1.0 // indirect
2322
github.com/jackmordaunt/icns/v3 v3.0.1 // indirect
2423
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ github.com/codeGROOVE-dev/retry v1.2.0 h1:xYpYPX2PQZmdHwuiQAGGzsBm392xIMl4nfMEFA
66
github.com/codeGROOVE-dev/retry v1.2.0/go.mod h1:8OgefgV1XP7lzX2PdKlCXILsYKuz6b4ZpHa/20iLi8E=
77
github.com/codeGROOVE-dev/sprinkler v0.0.0-20251001154245-068712aa969d h1:tQX67dAzyWVAaNe0EhYpj/AmWZo1Wwhaah6KVj7M3qs=
88
github.com/codeGROOVE-dev/sprinkler v0.0.0-20251001154245-068712aa969d/go.mod h1:RZ/Te7HkY5upHQlnmf3kV4GHVM0R8AK3U+yPItCZAoQ=
9-
github.com/codeGROOVE-dev/turnclient v0.0.0-20251001151440-a58eb9b17826 h1:ly6n4spiC6r0IOMl8QfZjv+qUnMHLvo/qErGPVMV3IE=
10-
github.com/codeGROOVE-dev/turnclient v0.0.0-20251001151440-a58eb9b17826/go.mod h1:JXk9gT6Qb496lnTcgpk9h917XaREGa+t6Kvg0YHAQJY=
9+
github.com/codeGROOVE-dev/turnclient v0.0.0-20251001194229-2aaea2e63cc7 h1:iRWrlJusl5FiEC1sCiPoW8IFei5bebAIornGtQFUHbc=
10+
github.com/codeGROOVE-dev/turnclient v0.0.0-20251001194229-2aaea2e63cc7/go.mod h1:Rt0k+aoZ13TvXKl9n2AeBabWIXZ/xIvurdwFTgyNk0w=
1111
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
1212
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
1313
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -23,8 +23,8 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
2323
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
2424
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
2525
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
26-
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
27-
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
26+
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
27+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
2828
github.com/google/go-github/v57 v57.0.0 h1:L+Y3UPTY8ALM8x+TV0lg+IEBI+upibemtBD8Q9u7zHs=
2929
github.com/google/go-github/v57 v57.0.0/go.mod h1:s0omdnye0hvK/ecLvpsGfJMiRt85PimQh4oygmLIxHw=
3030
github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8=

0 commit comments

Comments
 (0)