Skip to content

Commit 628ace2

Browse files
UPDATE
Co-authored-by: ChristopherHX <[email protected]> Signed-off-by: NorthRealm <[email protected]>
1 parent 985e641 commit 628ace2

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

services/mailer/mail_workflow_run.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,7 @@ func SendActionsWorkflowRunStatusEmail(ctx context.Context, sender *user_model.U
155155
log.Error("GetUserSetting: %v", err)
156156
return
157157
}
158-
if run.Status.IsSuccess() {
159-
if notifyPref == user_model.EmailNotificationGiteaActionsAll {
160-
recipients = append(recipients, sender)
161-
}
162-
sendActionsWorkflowRunStatusEmail(ctx, repo, run, sender, recipients)
163-
return
164-
} else if notifyPref != user_model.EmailNotificationGiteaActionsDisabled {
158+
if notifyPref == user_model.EmailNotificationGiteaActionsAll || !run.Status.IsSuccess() && notifyPref != user_model.EmailNotificationGiteaActionsDisabled {
165159
recipients = append(recipients, sender)
166160
}
167161
}

0 commit comments

Comments
 (0)