UnknownAttributeError 'remove_source_branch' when closing merge request
When closing a merge request and the remove_source_branch variable is part of the body, the server responds with a 500 Internal Server Error.
Response body:
{"message":"500 Internal Server Error"}
According to the docs (https://docs.gitlab.com/ce/api/merge_requests.html#update-mr), this should be valid.
The logs spits out a 'ActiveModel::UnknownAttributeError (unknown attribute 'remove_source_branch' for MergeRequest.)'
curl -v --header "PRIVATE-TOKEN:<token>" \
--header "Content-Type: application/json" \
--request PUT \
--data '{"id":"<id>","iid":"<iid>", "state_event" : "close", "remove_source_branch": false}' \
https://<host>/api/v4/projects/<id>/merge_requests/<iid>
Nevertheless, the merge requests is closed.
GitLab CE version: 11.9.6
Edited by Chris Kramer