When using the /merge quick command, we return 'Merged this MR message' when in fact we only try to merge
Info
When we are using the api/web ui/graphql /merge
quick action, it returns a message saying we have merged it.
curl --request POST -F "body=/merge" -F "merge_request_diff_head_sha=X" -H "PRIVATE-TOKEN: X" "http://localhost:3000/api/v4/projects/34/merge_requests/5/notes"
Returns the following
{"commands_changes":{"merge":"ec6c22b77ab5c6cebecb202f0b9b3fd8a294540a"},"summary":["Merged this merge request."]}
Even though the merge request failed to be merged.
We can try this on the Web UI. When the merge request is not able to be merged and we use the quick action, we have a blue box at the top saying it is merged, when in fact it is not. When we reload we get the red box saying it failed to merge.
How to improve
If the merge request is mergeable, then lets say we are merging this mr, otherwise, we say we can't merge it.
Edited by Marc Shaw