Skip to content

Commit

Permalink
fix: Deduplicate monday notification
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed Oct 25, 2022
1 parent 2fd1708 commit 1de9518
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/notifier/notifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ func (a App) handleKetchupNotification(ctx context.Context, usersToNotify map[mo
}

if usersToNotify[ketchup.User] != nil {
for _, userRelease := range usersToNotify[ketchup.User] {
if userRelease.Repository.ID == release.Repository.ID {
return
}
}

usersToNotify[ketchup.User] = append(usersToNotify[ketchup.User], release)
} else {
usersToNotify[ketchup.User] = []model.Release{release}
Expand Down

0 comments on commit 1de9518

Please sign in to comment.