azure-devops-pull-request-hub
azure-devops-pull-request-hub copied to clipboard
Failed policy "Require a merge strategy" if branch policy excludes Basic Merge strategy
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:
- Set up a build policy with Limit Merge Types enabled, with Basic Merge disabled.
- Create a pull request.
- Resolve all build policies, if any others were specified.
- 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:
Pull Request Hub:
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.