`merge_when_pipeline_succeeds` in the accepting MR API is broken
Summary
Since last night out merging bot stops working after upgrading Gitlab to 12.6. The symptom is that
- It calls the Accept MR API
- Wait for 30 seconds then check the
state
of the MR and make sure it'smerged
However the state
is still opened
after the API being called. Then we did some debug and found that calling this API with merge_when_pipeline_succeeds
set to be True
will cause the merging operation to fail. No error is returned. Gitlab just do nothing about this MR.
Removing this argument from the request body fixed the problem, but also invalidate the pipeline-check
(Summarize the bug encountered concisely)
Steps to reproduce
Call the Accept MR API with these arguments:
should_remove_source_branch=True
merge_when_pipeline_succeeds=True
sha=<MR HEAD commit hash>
merge_commit_message="xxxxx"
Example Project
We are using self-managed Gitlab instance.
What is the current bug behavior?
Gitlab does nothing about an MR if called with merge_when_pipeline_succeeds
What is the expected correct behavior?
Gitlab does merge the MR if called with merge_when_pipeline_succeeds
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)