Add git push option to "Delete source branch when merge request is accepted"
Current status
Currently the git push option allows you to create a new MR from the command line:
https://docs.gitlab.com/ee/user/project/merge_requests/#git-push-options
git push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds
But if one wants to delete the source branch automatically, one has to "edit" the MR, check "Delete source branch when merge request is accepted." and "Save changes". This will reset the merge_when_pipeline_succeeds
flag, so one also has to click "Merge when pipeline succeeds".
Proposed solution
Add a new merge_request.delete_source_branch_when_merged
git push option, so that instead of the above manual work, one could just do:
git push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.delete_source_branch_when_merged
and that's it.
Edited by Ondřej Čertík