azure-devops-pull-request-hub icon indicating copy to clipboard operation
azure-devops-pull-request-hub copied to clipboard

Failed policy "Require a merge strategy" if branch policy excludes Basic Merge strategy

Open MattJF90 opened this issue 4 years ago • 2 comments

Describe the bug When a branch policy is set up to limit merge types which disables the Basic Merge option, the "Require a merge strategy" policy check is flagged as failed. The PR is therefore flagged as incomplete, even though all other policy checks may be satisfied.

To Reproduce Steps to reproduce the behavior:

  1. Set up a build policy with Limit Merge Types enabled, with Basic Merge disabled.
  2. Create a pull request.
  3. Resolve all build policies, if any others were specified.
  4. Observe the pull request status in Pull Request Hub.

Expected behavior The policy check icon is green. All policy checks are completed. Pull request status icon shows as green checkmark.

Actual behaviour The policy check icon is red. The policy check for "Require a merge strategy" is failed, even though the user does not set this until PR completion. Pull request status icon shows as blue "waiting" icon due to pending failed policy checks.

Screenshots Policy: Policy

Pull Request Hub: PR

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version: 85.0.4183.121 (Official Build) (64-bit)

Additional context When enabling the Basic Merge option in the policy, the policy check switches to passing. Unchecking any merge option other than Basic Merge will cause the policy check to pass. This only seems to affect when Basic Merge is unchecked/disabled.

MattJF90 avatar Oct 06 '20 16:10 MattJF90