Skip to content

Commit

Permalink
Add empty repo check in DetectAndHandleSchedules (#29606)
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 authored Mar 5, 2024
1 parent f147795 commit 3f3335a
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 @@ -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)
Expand Down

0 comments on commit 3f3335a

Please # to comment.