From add85638d9702e008fa6cc0d76ffc65fa4fdc84d Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Tue, 5 Mar 2024 07:18:39 +0000 Subject: [PATCH] fix --- services/actions/notifier_helper.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/actions/notifier_helper.go b/services/actions/notifier_helper.go index b248af1d01834..b0d848b5add15 100644 --- a/services/actions/notifier_helper.go +++ b/services/actions/notifier_helper.go @@ -486,6 +486,10 @@ func handleSchedules( // DetectAndHandleSchedules detects the schedule workflows on the default branch and create schedule tasks func DetectAndHandleSchedules(ctx context.Context, repo *repo_model.Repository) error { + if repo.IsEmpty { + return nil + } + gitRepo, err := gitrepo.OpenRepository(context.Background(), repo) if err != nil { return fmt.Errorf("git.OpenRepository: %w", err)