Skip to content

Commit 391d6ee

Browse files
committed
update
1 parent 628ace2 commit 391d6ee

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

services/mailer/mail_workflow_run.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func generateMessageIDForActionsWorkflowRunStatusEmail(repo *repo_model.Reposito
3333
return fmt.Sprintf("<%s/actions/runs/%d@%s>", repo.FullName(), run.Index, setting.Domain)
3434
}
3535

36-
func sendActionsWorkflowRunStatusEmail(ctx context.Context, repo *repo_model.Repository, run *actions_model.ActionRun, sender *user_model.User, recipients []*user_model.User) {
36+
func composeAndSendActionsWorkflowRunStatusEmail(ctx context.Context, repo *repo_model.Repository, run *actions_model.ActionRun, sender *user_model.User, recipients []*user_model.User) {
3737
subject := "Run"
3838
switch run.Status {
3939
case actions_model.StatusFailure:
@@ -138,7 +138,7 @@ func sendActionsWorkflowRunStatusEmail(ctx context.Context, repo *repo_model.Rep
138138
}
139139
}
140140

141-
func SendActionsWorkflowRunStatusEmail(ctx context.Context, sender *user_model.User, repo *repo_model.Repository, run *actions_model.ActionRun) {
141+
func MailActionsTrigger(ctx context.Context, sender *user_model.User, repo *repo_model.Repository, run *actions_model.ActionRun) {
142142
if setting.MailService == nil {
143143
return
144144
}
@@ -161,6 +161,6 @@ func SendActionsWorkflowRunStatusEmail(ctx context.Context, sender *user_model.U
161161
}
162162

163163
if len(recipients) > 0 {
164-
sendActionsWorkflowRunStatusEmail(ctx, repo, run, sender, recipients)
164+
composeAndSendActionsWorkflowRunStatusEmail(ctx, repo, run, sender, recipients)
165165
}
166166
}

services/mailer/notify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,5 +211,5 @@ func (m *mailNotifier) WorkflowRunStatusUpdate(ctx context.Context, repo *repo_m
211211
if !run.Status.IsDone() {
212212
return
213213
}
214-
SendActionsWorkflowRunStatusEmail(ctx, sender, repo, run)
214+
MailActionsTrigger(ctx, sender, repo, run)
215215
}

0 commit comments

Comments
 (0)