Skip to content

Commit

Permalink
Add empty repo check in DetectAndHandleSchedules (#29606) (#29659)
Browse files Browse the repository at this point in the history
Backport #29606
  • Loading branch information
yp05327 authored Mar 8, 2024
1 parent 6651d2d commit bd7de0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/actions/notifier_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bd7de0c

Please sign in to comment.