From a9875e744238f9e01795638bca7283f780c92007 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Fri, 19 Apr 2024 04:10:54 +0000 Subject: [PATCH] revert some changes --- services/actions/notifier_helper.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/services/actions/notifier_helper.go b/services/actions/notifier_helper.go index da47075ec6..bbebd0a1ea 100644 --- a/services/actions/notifier_helper.go +++ b/services/actions/notifier_helper.go @@ -78,10 +78,6 @@ func newNotifyInput(repo *repo_model.Repository, doer *user_model.User, event we } } -func newNotifyInputForSchedules(repo *repo_model.Repository) *notifyInput { - return newNotifyInput(repo, user_model.NewActionsUser(), webhook_module.HookEventSchedule) -} - func (input *notifyInput) WithDoer(doer *user_model.User) *notifyInput { input.Doer = doer return input @@ -528,5 +524,8 @@ func DetectAndHandleSchedules(ctx context.Context, repo *repo_model.Repository) return nil } - return handleSchedules(ctx, scheduleWorkflows, commit, newNotifyInputForSchedules(repo), repo.DefaultBranch) + // We need a notifyInput to call handleSchedules + notifyInput := newNotifyInput(repo, user_model.NewActionsUser(), webhook_module.HookEventSchedule) + + return handleSchedules(ctx, scheduleWorkflows, commit, notifyInput, repo.DefaultBranch) }