Skip to content

Add Git push option to create a merge request

Right now I find it a bit cumbersome to push and have to create a merge request with the UI. I think it would more useful to create a merge request automatically using git push options.

Further details

This is a necessary step to Push and Merge When Pipeline Succeeds https://gitlab.com/gitlab-org/gitlab-ce/issues/53198

Proposal

Working on a feature branch, I will be able to push and create a new merge request be specifying a merge target

git push -u origin -o merge.target=master

GitLab will create a new merge request with the first line of my commit message as the merge request title, and body of my commit message as the description. If the merge request contains multiple commits, use the first commit message in the branch. Amended to: GitLab will create a new merge request using the existing logic used for the Web UI in regards to title and description https://gitlab.com/gitlab-org/gitlab-ce/issues/43263#note_158256194.

Links / references

Edited by Luke Duncalfe