diff --git a/services/actions/notifier_helper.go b/services/actions/notifier_helper.go index cc21d54f8..ff33c5a94 100644 --- a/services/actions/notifier_helper.go +++ b/services/actions/notifier_helper.go @@ -536,6 +536,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)