Change Merge Request target branch(es) depending on source branch

Problem to solve

In Git-flow model (see https://danielkummer.github.io/git-flow-cheatsheet/index.html), the target branch of a merge is not always the same:

  • develop should be the target branch when the source branch prefix is feature/
  • master should be the target branch when the source branch prefix is bugfix/, hotfix/ or release/

Now, developers need to manually select the target branch and it can be the wrong one.

Further details

gitlab-ce#33141 would also solve a related problem. A release, hotfix or bugfix branch should also be merged to develop. The possibility to have several target branches for a single Merge Request would be ideal.

Proposal

GitLab force the target branch(es) on the "New Merge Request" page depending on the source branch prefix (configurable in GitLab settings).

Assignee Loading
Time tracking Loading