Skip to content

Allow maintainers to push forks of a project for branches that have open MRs

Bob Van Landuyt requested to merge bvl-allow-maintainer-to-push into master

What does this MR do?

This MR makes it possible to allow maintainers of a project push to certain branches of forks of the project. This can be specified when creating/editing an MR:

Screen_Shot_2018-02-27_at_14.28.35

Checking this option will allow users that have developer access or above to the canonical project to push to the source branch specified in the MR.

The option should be visible when creating a merge request across different projects, when it is not available, we show these reasons:

Screen_Shot_2018-03-02_at_12.22.01

Screen_Shot_2018-03-02_at_12.21.48

Screen_Shot_2018-03-02_at_12.21.20

When the feature is enabled for a merge request, this is visible in the merge request widget:

Screen_Shot_2018-02-28_at_15.49.55

When editing a file from the merge request, we display this message to inform the user that they will committing directly on the source branch:

Screen_Shot_2018-02-28_at_10.21.13

Are there points in the code the reviewer needs to double check?

Currently, it is not possible to allow push access to protected branches. Should this be made possible? Or should we hide the option for protected branches? @jramsay @DouweM

TODO:

  • Adjust the UI to allow editing and committing by maintainers
  • Show messages explaining why the feature cannot be used when creating a merge request across different projects.
  • Add documentation

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22292

Edited by Bob Van Landuyt

Merge request reports