vsteam
vsteam copied to clipboard
Update a Pull Request for Auto Complete
Steps to reproduce
$user = Get-VSTeamUser | Where-Object DisplayName -eq '{User Name}'
Update-VSTeamPullRequest -RepositoryId $Repository.Id -PullRequestId $PR.pullRequestId -EnableAutoComplete -AutoCompleteIdentity $user
Expected behavior
PR gets updated
Actual behavior
No error, but PR is not updated
Environment data
OS
- [ ] macOS
- [ ] Windows
- [x] Linux
Server
- [ ] TFS 2017
- [ ] TFS 2018
- [x] Azure DevOps Server
- [ ] Azure DevOps Service
> Get-VSTeamAPIVersion
Billing : 5.1-preview.1
Build : 5.1
Core : 5.1
DistributedTask : 6.0-preview
DistributedTaskReleased : 5.1
ExtensionsManagement : 6.0-preview
Git : 5.1
Graph : 6.0-preview
HierarchyQuery : 5.1-preview
MemberEntitlementManagement : 6.0-preview
Packaging : 6.0-preview
Pipelines : 5.1-preview
Policy : 5.1
Processes : 6.0-preview
Release : 5.1
ServiceEndpoints : 5.0-preview
TaskGroups : 6.0-preview
Tfvc : 5.1
VariableGroups : 5.1-preview.1
Version : AzD # Also tried VSTS, AzD2019U1
> $PSVersionTable
Name Value
---- -----
PSVersion 7.1.3
PSEdition Core
GitCommitId 7.1.3
OS Linux 4.14.225-168.357.amzn2.x86_64 #1 SMP Mon Mar 15 18:00:02 UTC 2021
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
I also tried to DisableAutoComplete after manually setting the auto complete. It also did nothing after returning like it did something.
Do the other options work? Is it only this flag which is not working?
Setting to Draft and back to Active worked
Checking it today.
Thanks. I checked it and it turns out this one is not implemented at all.
When updating the PR with an auto merge option the following object (with possible options in the values) is usually PATCHed:
{
"completionOptions": {
"autoCompleteIgnoreConfigIds": [],
"bypassPolicy": false | true,
"deleteSourceBranch": false | true,
"mergeCommitMessage": "Commit Message",
"mergeStrategy": 1 | 2 | 3 | 4,
"transitionWorkItems": false | true
},
"autoCompleteSetBy": {
"id": "user id"
}
}
But the cmdlet is only pushing the ´autoCompleteSetBy´ property and not the rest. But the commit Message and Merge strategy objects are a minimum that need to be added. So I will implement this later.
Thanks for the update. Looking forward to the fix!