Browse Source

Add empty repo check in DetectAndHandleSchedules (#29606) (#29659)

Backport #29606
tags/v1.21.8
yp05327 3 months ago
parent
commit
bd7de0c4e4
No account linked to committer's email address
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      services/actions/notifier_helper.go

+ 4
- 0
services/actions/notifier_helper.go View File

@@ -459,6 +459,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 := git.OpenRepository(context.Background(), repo.RepoPath())
if err != nil {
return fmt.Errorf("git.OpenRepository: %w", err)

Loading…
Cancel
Save