Skip to content

Rebase is not available when MR is from a fork

Summary

https://gitlab.com/gitlab-org/gitlab-ee/issues/85 describes an issue we were also having; that when using a FF-only merge strategy the rebase button needs to be available for MRs that come from forks.

That issue was closed as a duplicate of https://gitlab.com/gitlab-org/gitlab-ce/issues/22292 however the fix for that has not fixed the original issue.

Steps to reproduce

  1. Set project to ff-only merge strategy
  2. Fork project
  3. Add a commit to original project & to fork
  4. Open MR from fork to upstream

What is the current bug behavior?

It is not possible to rebase the MR unless the user has enabled 'Allow edits from maintainers'.

We have to workaround this by making all our approvers gitlab admins, which to put it mildly is highly undesirable.

What is the expected correct behavior?

The rebase button should ALWAYS be available.

Possible fixes

  1. (preferred) projects should have a "merge requests cannot be created unless "Allow edits from maintainers" is set" flag
  2. (preferred) rebase should be possible even when 'Allow edits from maintainers' is not set
  3. "Allow edits from maintainers" should be reworded as "Allow project maintainer to merge this pull request" and default to on if the upstream has ff-only merge set. (This is only partly tongue in cheek and would be realistic with an improved wording I think.)
Edited by 🤖 GitLab Bot 🤖