Show rebase button on MR whenever behind target branch
Problem to solve
The rebase button only currently shows when fast-forward merges are enabled yet many development workflows do not use that merge strategy and still require frequent rebasing. The GitLab project itself is a prime example where this merge strategy is not used but rebasing is needed often. Rebasing is often required to fix CI, bring a stale MR up to date, etc. The GitLab UI current does not offer this functionality (although a /rebase command was recently added) which creates another barrier to efficient development workflows by requiring developers and maintainers to do this locally. This is also a barrier to open source contributions in some cases because of the need to request developer to rebase rather than maintainer just clicking rebase button.
Additionally, it is confusing that sometimes GitLab UI shows rebase button and other times it does not. Many bug reports (below) have brought this up.
Intended users
Developers
Maintainers
User experience goal
The user should be able to use the GitLab to rebase branch from MR. This is part of larger desire to enable more development in happen within GitLab UI (see #29406 (comment 267920250)).
Proposal
Anytime MR/source branch is behind target branch rebase option should be shown. If automatic rebase is not possible GitLab MR UI should reflect that. If a conflict exists and can be fixed via GitLab UI a button to do so should be provided.
Further details
For example on !59749 (closed) it currently shows as follows. It tells me my MR is behind target branch but with no option to catch up to target branch.
Permissions and Security
Documentation
Availability & Testing
Available Tier
Free
What does success look like, and how can we measure that?
Developers and maintainers can seamlessly rebase from MR UI.
