Преглед изворни кода

Merge pull request #2269 from porter-dev/nafees/hotfixes

[hotfix] Cover all cases to check the number of workflow runs
abelanger5 пре 3 година
родитељ
комит
203472e831
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
 	}