NGitLab
NGitLab copied to clipboard
GetJobsAsync(PipelineJobQuery query) appears not to be async
Hi,
I came across the method GetJobsAsync() in the PipelineClient which from the naming seems to be async, but the implementation doesn't really look like it supports async operations?
https://github.com/ubisoft/NGitLab/blob/main/NGitLab.Mock/Clients/PipelineClient.cs#L273
Sorry for the late reply...
The name may indeed be a bit misleading. The method returns a GitLabCollectionResponse<Job> which, although it cannot be awaited, can be enumerated asynchronously:
var jobs = pipelineClient.GetJobsAsync(pipelineJobQuery);
await foreach (var job in jobs)
{
}