Skip to content

`merge_status` in Merge Request API does not reflect true status

NOTE: This issue is currently blocked by &5598 (closed) which seeks to improve mergeability checks making it easier to diagnose and remedy these issues.

Summary

The merge_status field in the Merge Request JSON API does indicate proper status if the merge is blocked due to a bad build.

Steps to reproduce

  1. Configure a project to disallow merging if build fails
  2. Create a merge request for a branch whose tests fail
  3. Use API to get info on that merge request

Expected behavior

merge_status: 'cannot_be_merged' in JSON response

Actual behavior

merge_status: 'can_be_merged' in JSON response

Output of checks

Results of GitLab application Check

Unfortunately I don't have access to the terminal where our Gitlab server is running, but the Admin console indicates healthy. We're running v8.9.6.

Results of GitLab environment info

Ditto

Edited by Kai Armstrong