azure-devops-cli-extension: [Bug] Passing --auto-complete does not auto-complete if branch policy on merge type is applied

Describe the bug If you pass auto-complete in az repos pr create command autocomplete appears to be turned on, but the PR does not actually autocomplete when all criteria are met. We have a work item requirement, 2 approvers requirement, and passing build requirement.

To Reproduce Azure Cli Version: 2.0.62

Azure-Devops extension version: 0.4.0

Steps to reproduce the behavior:

  1. login using az login
  2. create pr using az repos pr create --auto-complete from a branch on git repository
  3. complete all requirements for pr to close
  4. See that PR does not actually close in browser

Expected behavior PR should merge and complete as soon as the last requirement is met

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 6
  • Comments: 19

Most upvoted comments

Any news on this? The v6.0 REST API is no longer in preview…

Any new update?

If branch policy on merge strategy is applied and it does not allow basic or squash merge, --auto-complete set via CLI will not work.

If branch policy allows the basic merge or squash merge and user sets the --squash option correctly as per policy only then will the PR auto-complete work correctly.

image

Fix for this is blocked on API dependency.

sure, it will take a little bit because we require 2 approvers, so I have to find someone to approve the pr, but I will get this added today. As a side note, we have the following policies turned on: 2 approvers 1 required approver from a group All comments resolved (required) Build passing Linked work item

I will get you an example later today though