问题
We have a PR in TFS which cannot be completed or abandoned, because the button is grayed out/disabled. The tooltip on hover says:
Merge must finish before the Pull Request can be completed
Merge in progress ... [Abandon] [Restart Merge]
Screenshot (notice the grayed out button):
How do we complete it? Is there an unfinished merge in git? If so, how was the branch pushed in the first place? And why can't it be Abandoned at least?
Googling with the full error text doesn't yield any results, it hasn't been documented anywhere on the internet it seems.
回答1:
If you have a merge that's blocked or stuck, you could try to click the triple-dot menu (...) next to the "Complete" button and choose the "Restart merge" option to start a new merge job.
The root cause was an issue with the job agents that perform merges running out of disk space.
If above is not work, also try to open two browsers and delete the source branch, then abandon your PR, then Undo the branch deletion. You could finally either reactivate the PR again or create a new one.
We have a open live site investigation regarding this issue. Please refer to the following for more information:
Issues with Pull Requests on Visual Studio Team Services - 03/17 -Mitigated
回答2:
First, check if this is a right issue: you might have the right to review but not approve. (See Review code with pull requests)
Second, check the branch policy:
The number of required approvals in a pull request is set from the branch policy for the branch. Pull requests can be completed if the number of required approvals is met, even if other reviewers have rejected the changes.
Third, I suppose that in order to abandon the PR, you might need to abandon first the merge in progress.
来源:https://stackoverflow.com/questions/46728924/tfs-error-merge-must-finish-before-the-pull-request-can-be-completed