diff --git a/main.go b/main.go index ddc0ef1..89c83ea 100644 --- a/main.go +++ b/main.go @@ -170,6 +170,11 @@ func main() { log.Printf("Listing workflow runs for: %s", repo.GetFullName()) if orgName != "" { runs, res, err = client.Actions.ListRepositoryWorkflowRuns(ctx, orgName, repo.GetName(), opts) + if err != nil { + log.Printf("Error getting the workflow runs for: %s", repo.GetFullName()) + // reset error to prevent stopping the run + err = nil + } } if userName != "" { realOwner := userName @@ -178,6 +183,11 @@ func main() { realOwner = *repo.Owner.Login } runs, res, err = client.Actions.ListRepositoryWorkflowRuns(ctx, realOwner, repo.GetName(), opts) + if err != nil { + log.Printf("Error getting the workflow runs for: %s", repo.GetFullName()) + // reset error to prevent stopping the run + err = nil + } } if _, ok := repoSummary[repo.GetFullName()]; !ok { @@ -192,7 +202,9 @@ func main() { log.Fatal(err) } - workflowRuns = append(workflowRuns, runs.WorkflowRuns...) + if runs != nil { + workflowRuns = append(workflowRuns, runs.WorkflowRuns...) + } if len(workflowRuns) == 0 { break