Prevent duplicate actions email (#35215)

Trying to prevent duplicate action emails by adding an extra check on job status.

---------

Signed-off-by: NorthRealm <155140859+NorthRealm@users.noreply.github.com>
Co-authored-by: Christopher Homberger <christopher.homberger@web.de>
This commit is contained in:
NorthRealm
2025-08-25 00:30:56 +08:00
committed by GitHub
parent ed8d4dc37a
commit c7b99c8cc7
5 changed files with 503 additions and 55 deletions

View File

@@ -208,8 +208,7 @@ func (m *mailNotifier) RepoPendingTransfer(ctx context.Context, doer, newOwner *
}
func (m *mailNotifier) WorkflowRunStatusUpdate(ctx context.Context, repo *repo_model.Repository, sender *user_model.User, run *actions_model.ActionRun) {
if !run.Status.IsDone() {
return
if err := MailActionsTrigger(ctx, sender, repo, run); err != nil {
log.Error("MailActionsTrigger: %v", err)
}
MailActionsTrigger(ctx, sender, repo, run)
}