"Merge when pipeline succeeds" visible if approvals are pending
Originally filed in CE (https://gitlab.com/gitlab-org/gitlab-ce/issues/27019) by @mburtscher
Summary
Even if approvals are missing (configured: at least 1 / actual: 0) the button "Merge when pipeline succeeds" is visible. Clicking it fails with "Something went wrong…"
The "Merge" button (if there is no pending pipeline) is not visible if approvals are missing
Steps to reproduce
Create a project with both pipelines enabled and required approvals for merging. Create a pull-request.
Expected behavior
Button "Merge when pipeline succeeds" should not be visible.
Actual behavior
Button is visible, clicking it will cause an error.
cc: @grzesiek