diff --git a/internal/event/processor.go b/internal/event/processor.go index 7665000..aa13119 100644 --- a/internal/event/processor.go +++ b/internal/event/processor.go @@ -175,14 +175,18 @@ func (p *Processor) HandlePullRequest(e *webhook.PullRequestEvent) { } } - // Remove the actor from notifications (don't notify yourself) - beforeFilter := len(usersToNotify) - usersToNotify = p.filterOutActor(usersToNotify, event.Actor) - p.logger.Debug(). - Int("before_filter", beforeFilter). - Int("after_filter", len(usersToNotify)). - Str("actor_filtered", event.Actor.GiteaUsername). - Msg("filtered out actor from notifications") + // Remove the actor from notifications (don't notify yourself) - but SKIP for review_requested because CI automation may request as same user + if e.Action == "review_requested" { + p.logger.Debug().Str("actor", event.Actor.GiteaUsername).Msg("skipping actor filter for review_requested (CI automation)") + } else { + beforeFilter := len(usersToNotify) + usersToNotify = p.filterOutActor(usersToNotify, event.Actor) + p.logger.Debug(). + Int("before_filter", beforeFilter). + Int("after_filter", len(usersToNotify)). + Str("actor_filtered", event.Actor.GiteaUsername). + Msg("filtered out actor from notifications") + } // Send notifications p.sendNotifications(ctx, event, usersToNotify) @@ -402,10 +406,10 @@ func (p *Processor) sendNotifications(ctx context.Context, event *Event, users [ // filterOutActor removes the event actor from the notification list func (p *Processor) filterOutActor(users []struct { user User - reason NotificationReason + reason NotificationReasol }, actor User) []struct { user User - reason NotificationReason + reason NotificationReasol } { var filtered []struct { user User