Просмотр исходного кода

hotfix for workflow runs slice length

Mohammed Nafees 3 лет назад
Родитель
Сommit
4452aabfc6
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      api/server/shared/commonutils/git_utils.go

+ 1 - 1
api/server/shared/commonutils/git_utils.go

@@ -39,7 +39,7 @@ func GetLatestWorkflowRun(client *github.Client, owner, repo, filename, branch s
 		return nil, err
 	}
 
-	if workflowRuns == nil || workflowRuns.GetTotalCount() == 0 {
+	if workflowRuns == nil || workflowRuns.GetTotalCount() == 0 || len(workflowRuns.WorkflowRuns) == 0 {
 		return nil, ErrNoWorkflowRuns
 	}