diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 15361d6..95ced27 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -11,6 +11,7 @@ Ready to Review is an elegant modern Slack bot written in Go that integrates wit ### 1. Channel Thread Management - Start threads in Slack channels when new PRs are created - Update message prefix emoji based on PR state: + - `:new:` - newly published (appears for ~15 seconds before state changes) - `:test_tube:` - tests running/pending - `:cockroach:` - tests broken (blocked on author) - `:hourglass:` - waiting on review diff --git a/internal/bot/bot.go b/internal/bot/bot.go index d22912e..cbe8320 100644 --- a/internal/bot/bot.go +++ b/internal/bot/bot.go @@ -898,6 +898,8 @@ func (c *Coordinator) updateDMMessagesForPR(ctx context.Context, pr prUpdateInfo prefix := notify.PrefixForState(prState) var action string switch prState { + case "newly_published": + action = "newly published" case "merged": action = "merged" case "closed": diff --git a/internal/notify/notify.go b/internal/notify/notify.go index ae518a3..f4c3a90 100644 --- a/internal/notify/notify.go +++ b/internal/notify/notify.go @@ -90,6 +90,8 @@ type PRInfo struct { // Exported for use by bot package to ensure consistent PR state display. func PrefixForState(prState string) string { switch prState { + case "newly_published": + return ":new:" case "tests_running": return ":test_tube:" case "tests_broken": @@ -249,6 +251,8 @@ func (m *Manager) NotifyUser(ctx context.Context, workspaceID, userID, channelID // Format: :emoji: Title · author → action var action string switch pr.State { + case "newly_published": + action = "newly published" case "tests_broken": action = "fix tests" case "awaiting_review":