Can't complete an Azure DevOps pull request after resolving conflicts
You resolved the merge conflicts, but the pull request still won't complete: the blue button says Set auto-complete instead of Complete, or Complete merge is greyed out. Here is why that happens and what to check, roughly in order.
Install from the Marketplace See how it works Watch the 1-minute video
What happens after you resolve conflicts
Resolving conflicts in the browser, with the DevLabs Conflicts tab or an extension like Merge Conflict Resolver, creates a new commit on the source branch. That push has side effects:
- Azure DevOps runs the merge check again. Wait until Checking for merge conflicts finishes. If it never does, see pull request stuck on “Checking for merge conflicts”.
- Build validation is queued again.
- If the minimum-reviewers policy has Reset all approval votes (or one of the other options under When new changes are pushed) turned on, earlier approvals no longer count and reviewers have to approve again.
What to check, in order
1. Look at the policies on the Overview tab
While a required branch policy isn't met, the main button reads Set auto-complete instead of Complete. Complete is still in the menu next to it, but in the Complete pull request panel the Complete merge button is disabled, with the reason at the top (for example “0 of 1 reviewers approved” or “Not all comments resolved”). The checks section on the pull request's Overview shows each policy, such as “1 required check failed” with the ones that fail:
- required reviewers;
- build validation;
- comment resolution (“comments must be resolved”);
- linked work items;
- required status checks.
Fix the one that fails. For comment resolution, resolve or close every active comment thread. A policy with a clock icon is still pending (for example, waiting for a reviewer), not failed. A policy that was added after the pull request was created may only show up after the next push to it.
2. Publish the pull request if it is a draft
A draft pull request shows Publish instead of Complete, and reviewers can't approve it yet. Publish it first. If the menu next to the main button offers Mark as draft, the pull request is already published and something else, usually a policy, blocks completion.
3. Restart the merge if the status looks stale
Open the pull request's More actions (…) menu and choose Restart merge to run the merge check again.
4. Check for new conflicts
If the target branch moved on while you were resolving, new conflicts can appear. Resolve those too; see how to resolve merge conflicts in an Azure DevOps pull request and how to update a pull request with the target branch.
5. Check your permissions
Completing a pull request needs Contribute permission on the repository. Bypassing policies when completing needs the separate Bypass policies when completing pull requests permission.
Tip: set auto-complete
When the target branch has required policies, choose Set auto-complete: the pull request then completes by itself once all policies pass.
Install from the Marketplace See how it works
Related guides
- Azure DevOps pull request stuck on “Checking for merge conflicts”
- How to resolve merge conflicts in an Azure DevOps pull request
- How to update a pull request with the target branch in Azure DevOps
- Conflicts tab not loading in Azure DevOps
- Merge Conflict Resolver: features, pricing and free plan