Skip to content

Commit 3e19d85

Browse files
authored
Merge pull request #53 from codeGROOVE-dev/reliable
delete obsoleted thread replies
2 parents bcdc683 + c517af6 commit 3e19d85

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

internal/bot/polling.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -350,14 +350,12 @@ func (c *Coordinator) updateClosedPRThread(ctx context.Context, pr *github.PRSna
350350

351351
// updateThreadForClosedPR updates a single thread's message to reflect closed/merged state.
352352
func (c *Coordinator) updateThreadForClosedPR(ctx context.Context, pr *github.PRSnapshot, channelID string, info ThreadInfo) error {
353-
var emoji, msg string
353+
var emoji string
354354
switch pr.State {
355355
case "MERGED":
356356
emoji = ":rocket:"
357-
msg = "This PR was merged"
358357
case "CLOSED":
359358
emoji = ":x:"
360-
msg = "This PR was closed without merging"
361359
default:
362360
return fmt.Errorf("unexpected PR state: %s", pr.State)
363361
}
@@ -374,13 +372,6 @@ func (c *Coordinator) updateThreadForClosedPR(ctx context.Context, pr *github.PR
374372
return fmt.Errorf("failed to update message: %w", err)
375373
}
376374

377-
// Post follow-up comment (don't fail if this errors - main update succeeded)
378-
if err := c.slack.PostThreadReply(ctx, channelID, info.ThreadTS, msg); err != nil {
379-
slog.Debug("failed to post follow-up comment for closed PR",
380-
"pr", fmt.Sprintf("%s/%s#%d", pr.Owner, pr.Repo, pr.Number),
381-
"error", err)
382-
}
383-
384375
return nil
385376
}
386377

0 commit comments

Comments
 (0)