Я создал запрос на извлечение с помощью этого оператора:
pullRequest = gitClient.CreatePullRequestAsync(gitPullRequest, shrdRepo.Id,
supportsIterations: true, cancellationToken: token).Result;
Я пытаюсь добавить рецензента и рабочие элементы к нему.Для добавления рецензента попытался идентифицировать рецензента, используя приведенное ниже утверждение.Но я получаю исключение:
IdentityHttpClient identityHttpClient = new IdentityHttpClient(new Uri(c_collectionUri), creds);
IdentitiesCollection identitiesPerAlias = identityHttpClient.ReadIdentitiesAsync(IdentitySearchFilter.MailAddress, mail, cancellationToken:token).Result;
Исключение составляет:
Exception when looking for vsts identity for alias xyzxyz.com. System.AggregateException: One or more errors occurred. ---> Microsoft.VisualStudio.Services.WebApi.VssResourceNotFoundException: API resource location 28010c54-d0c0-4c89-a5b0-1c9e188b9fb7 is not registered on https://dev.azure.com/xyz.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<CreateRequestMessageAsync>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Identity.Client.IdentityHttpClient.<ReadIdentitiesAsyncInternal>d__42.MoveNext()
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at AzureDevOpsSample.Program.<SearchForReviewerVstsIdentity>d__4.MoveNext() in D:\Projects\tools_release_notes\tools-ReleaseNotes_PR_Working\createPrForSharedRepo\Program.cs:line 349
---> (Inner Exception #0) Microsoft.VisualStudio.Services.WebApi.VssResourceNotFoundException: API resource location 28010c54-d0c0-4c89-a5b0-1c9e188b9fb7 is not registered on https://dev.azure.com/xyz.
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<CreateRequestMessageAsync>d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Identity.Client.IdentityHttpClient.<ReadIdentitiesAsyncInternal>d__42.MoveNext()<---
Может кто-нибудь предложить мне идентифицировать рецензента и добавить рабочие элементы для запроса на извлечение?