Check immeditately mergeable correctly

What does this MR do and why?

Fixes the auto-merge API endpoint to correctly check merge request mergeability, aligning API behavior with the UI.

How to test

  1. Create a merge request with merge_after set to a future time
  2. Wait for pipeline to succeed
  3. Use the API to set auto_merge:
    PUT /projects/:id/merge_requests/:iid/merge?auto_merge=true
  4. Before: Request fails with "Branch cannot be merged"
  5. After: Request succeeds and sets auto-merge

Related Issue: #547151

Edited by Marc Shaw

Merge request reports

Loading