fix: Use artifacts download API for authenticated endpoints (#4)
This commit is contained in:
Родитель
31736fb597
Коммит
11fc762173
|
@ -84,12 +84,10 @@ namespace dotnet_azdo_artifacts_multidownload
|
|||
if (artifacts.Any(a => a.Name == artifactName))
|
||||
{
|
||||
Console.WriteLine($"Getting artifact for build {build.Id}");
|
||||
|
||||
var artifact = await client.GetArtifactAsync(project, build.Id, artifactName);
|
||||
|
||||
|
||||
using var downloadClient = new HttpClient();
|
||||
|
||||
using (var stream = await downloadClient.GetStreamAsync(artifact.Resource.DownloadUrl))
|
||||
using (var stream = await client.GetArtifactContentZipAsync(project, build.Id, artifactName))
|
||||
{
|
||||
using (var f = File.OpenWrite(tempFile))
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче