I would like to abandon a pull request in TFS using REST API from PowerShell. Besides, I need the source branch to be deleted, too. According to the official docs, it is possible and the sample REST request might look like this:
The URL is:
http://tfs.server/tfs/DefaultCollection/_apis/git/repositories/{repo_ID}/pullrequests/{PR_ID}?api-version=3.0-preview
The body is:
{
"status": "abandoned",
"completionOptions": {
"deleteSourceBranch": "true"
}
}
The pull request becomes abandoned as expected, however the source branch is NOT deleted.
Is it possible to delete the source branch when PR is abandoned via REST API? Is so, how? Perhaps, completionOptions
is only for completing PR, not abandoning?..
I'm using TFS 2015 Update-3 (version 14.102.25423.0).