microsoft / azure-devops-dotnet-samples

.NET/C# samples for integrating with Azure DevOps Services and Azure DevOps Server

Home Page:https://docs.microsoft.com/azure/devops/integrate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create PR with autocomplete

ajuliang opened this issue · comments

Hello.
I want to create a PR with autocomplete and I sent the following request:

GitPullRequest parameters = new GitPullRequest()
{
SourceRefName = "branchsource",
TargetRefName = "branchtarget",
Title = "titulo pr",
Description = "desc pr",
AutoCompleteSetBy = new IdentityRef
{
Id = identity.Id.ToString()
},
CompletionOptions = new GitPullRequestCompletionOptions
{
MergeCommitMessage = "Merge: desc pr",
DeleteSourceBranch = true,
MergeStrategy = GitPullRequestMergeStrategy.Squash,
SquashMerge = true
}
};

_gitClient.CreatePullRequestAsync(parameters, repo.Id).Result;

The PR was created without the autocomplete feature.

How can I fix my code?

Thank you.

commented

I have the same problem. How to create a autocomplete PR?