Fix Import/Export issue to do with fork merge requests
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/36666
Importing forked MRs resulted in an error to do with not exporting the *_branch_sha
attributes properly. Also, using project.repository.branch_exists?
uses a cached version of the branch names that we can't use in case MRs point to the same branch, as that will lead to an error.
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together
What are the relevant issue numbers?
Edited by James Lopez