Use "Link" header for pagination completion check

This commit is contained in:
Harvey Sanders 2023-09-03 20:32:08 -04:00
parent acc362f9d8
commit d5d10a6f38

View file

@ -448,9 +448,6 @@ func GetJobs(client *api.Client, repo ghrepo.Interface, run *Run) ([]Job, error)
}
run.Jobs = append(run.Jobs, resp.Jobs...)
if len(run.Jobs) >= resp.TotalCount {
return run.Jobs, nil
}
}
return run.Jobs, nil
}