Error when a merge request targets a feature branch: "Branch has been updated since merge was requested"
Summary
In a merge request, if the target branch is different than the default branch, I see this failure "Branch has been updated since merge was requested". There was no way to merge the MR from the UI at this point, even though there are no conflicts and no other blocking parts (approvals, failing tests, etc.).
If I change the target branch to master, and then back to a feature branch, the error goes away and the merge button is shown (but the red error note still remains). MR this happened in gitlab-docs!624 (merged).
Steps to reproduce
Create a merge request targeting a branch other than the default branch using push options.
In our case we used those options:
git push origin #{branch_name} \
-o merge_request.create \
-o merge_request.target=#{version} \
-o merge_request.remove_source_branch \
-o merge_request.merge_when_pipeline_succeeds \
-o merge_request.title="#{mr_title}" \
-o merge_request.label="release"
We have a raketask that performs that https://gitlab.com/gitlab-org/gitlab-docs/blob/d8693ec00435b12f8c819647bfa6bac6e096bf9b/Rakefile#L200.
Example Project
I tried to reproduce in gitlab-docs!629 (closed), not sure if this will work.