Rebase button should still be labeled "Rebase" while a rebase operation is running
Summary
On a merge request for a project that is configured to only accept fast-forward merges, the state of the rebase operation triggered when the Rebase button is clicked is not accurately reflected by the button's label, since it immediately changes to "Merge" even though the operation in progress is not a merge operation. This could make the user think that they've accidentally triggered a merge operation instead.
Steps to reproduce
- Configure your project's
Merge method
to beFast-forward merge
(underSettings (General)
=>Merge Requests
) - Create a feature branch off of the default branch
- Create a merge request for the feature branch
- Make any commit to the default branch (to make the feature branch un-mergeable)
- Navigate to the merge request, it should now have a Rebase button in place of the Merge button
- Click the "Rebase" button to rebase the merge request
- The button label switches to "Merge" as soon as the operation starts, making it look like a merge is in progress instead
Here are some of the states that the widget goes through between the trigger of a rebase and its completion:
situation | screenshot |
---|---|
Merging | ![]() |
Example Project
What is the current bug behavior?
The Merge/Rebase button reads "Merge" while a rebase is running
What is the expected correct behavior?
The Merge/Rebase button should read "Rebase" or "Rebasing" while a rebase is running, and only switch to "Merge" once the rebase is complete
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: `sudo gitlab-rake gitlab:env:info`) (For installations from source run and paste the output of: `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
Design Proposal
Step | Visual |
---|---|
Rebase in progress | ![]() |
Rebase Complete | ![]() |