Accepting merge though API has no effect and no error (possible interaction with "merge_when_pipeline_succeeds")
Summary
Accepting a MR through API gives no error, but the MR is not merged, just nothing happens.
Steps to reproduce
Enable "Pipelines must succeed", no pipelines for post-merge results. (I have "fast-forward merge in case it matters.)
Write a .gitlab-ci.yml file, with MR pipelines (some only: merge_requests).
Create a MR. Make sure a "detached pipeline" is created and passes.
Merge the MR through API:
curl --request PUT --header "Private-Token: {private_token}" "https://gitlab.com/api/v4/projects/{project_id}/merge_requests/{mr_id}/merge?should_remove_source_branch=true&merge_when_pipeline_succeeds=true&sha={sha}"
Example Project
https://gitlab.com/Jellby/test
What is the current bug behavior?
Nothing happens in the MR as far as I can see. In the terminal I get the MR json, including:
"merge_status": "can_be_merged",
"merge_when_pipeline_succeeds": false,
...
"should_remove_source_branch": null,
Removing the merge_when_pipeline_succeeds=true parameter from the command line merges the MR.
What is the expected correct behavior?
The MR should be merged, or I should get some error/warning about why that didn't happen.
Output of checks
This bug happens on GitLab.com
Possible fixes
Edited by Jellby