mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-17 22:09:30 +01:00
Any other recipient?
This commit is contained in:
parent
afe2deefbb
commit
cc6c8d1b0d
@ -10,7 +10,6 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
actions_model "code.gitea.io/gitea/models/actions"
|
actions_model "code.gitea.io/gitea/models/actions"
|
||||||
"code.gitea.io/gitea/models/db"
|
|
||||||
repo_model "code.gitea.io/gitea/models/repo"
|
repo_model "code.gitea.io/gitea/models/repo"
|
||||||
user_model "code.gitea.io/gitea/models/user"
|
user_model "code.gitea.io/gitea/models/user"
|
||||||
"code.gitea.io/gitea/modules/base"
|
"code.gitea.io/gitea/modules/base"
|
||||||
@ -155,18 +154,6 @@ func SendActionsWorkflowRunStatusEmail(ctx context.Context, sender *user_model.U
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
watchers, err := repo_model.GetRepoWatchers(ctx, repo.ID, db.ListOptionsAll)
|
// TODO: Any other recipient?
|
||||||
if err != nil {
|
|
||||||
log.Error("GetWatchers: %v", err)
|
|
||||||
}
|
|
||||||
for _, watcher := range watchers {
|
|
||||||
if watcher.ID == sender.ID {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if watcher.IsMailable() && watcher.EmailNotificationsPreference != user_model.EmailNotificationsOnMention &&
|
|
||||||
watcher.EmailNotificationsPreference != user_model.EmailNotificationsDisabled {
|
|
||||||
recipients = append(recipients, watcher)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sendActionsWorkflowRunStatusEmail(ctx, repo, run, sender, recipients)
|
sendActionsWorkflowRunStatusEmail(ctx, repo, run, sender, recipients)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user