Skip to content

Commit 810db79

Browse files
authored
Merge pull request #58 from codeGROOVE-dev/reliable
Add support for a 🆕 state
2 parents cf31574 + 336fc56 commit 810db79

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.claude/CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Ready to Review is an elegant modern Slack bot written in Go that integrates wit
1111
### 1. Channel Thread Management
1212
- Start threads in Slack channels when new PRs are created
1313
- Update message prefix emoji based on PR state:
14+
- `:new:` - newly published (appears for ~15 seconds before state changes)
1415
- `:test_tube:` - tests running/pending
1516
- `:cockroach:` - tests broken (blocked on author)
1617
- `:hourglass:` - waiting on review

internal/bot/bot.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,8 @@ func (c *Coordinator) updateDMMessagesForPR(ctx context.Context, pr prUpdateInfo
898898
prefix := notify.PrefixForState(prState)
899899
var action string
900900
switch prState {
901+
case "newly_published":
902+
action = "newly published"
901903
case "merged":
902904
action = "merged"
903905
case "closed":

internal/notify/notify.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ type PRInfo struct {
9090
// Exported for use by bot package to ensure consistent PR state display.
9191
func PrefixForState(prState string) string {
9292
switch prState {
93+
case "newly_published":
94+
return ":new:"
9395
case "tests_running":
9496
return ":test_tube:"
9597
case "tests_broken":
@@ -249,6 +251,8 @@ func (m *Manager) NotifyUser(ctx context.Context, workspaceID, userID, channelID
249251
// Format: :emoji: Title <url|repo#123> · author → action
250252
var action string
251253
switch pr.State {
254+
case "newly_published":
255+
action = "newly published"
252256
case "tests_broken":
253257
action = "fix tests"
254258
case "awaiting_review":

0 commit comments

Comments
 (0)