Search code examples
azureazure-devopscontinuous-integrationcontinuous-deploymentcicd

Is it possible to disable "Set auto-complete" option in Azure Devops?


Auto complete is a good option for finishing a PR and automatically merging the changes. But, an option to disable this button for some projects/repos would be nice. Even better if we can disable this only for particular teams. We have a case where completing a merge starts a release and if a Pull Request is approved accidentally, we've pushed bad code to master.

enter image description here


Solution

  • As far as I know, it is not possible we have had this issue in my previous team. You have two options:

    1. If someone merges mistakenly you might end up reverting the merge.
    2. Create an approval policy, so that no one can merge to Main or any given branch without one or more team members reviewing and approving the pull request. Even in this option and even if the PR is approved, you might end up reverting in some situations, but at least reduce the mistakenly merging factor.

    Check Microsoft doc for policy.

    If you already use policy, you could consider using the git-flow strategy, so you always merge to develop branch instead of the main, but that will slow the release process.

    Finally, you can suggest new features for Azure DevOps, read here.

    You can also read about the latest updates of Azure DevOps.