Unable to import project which contains merge requests with null target_branch
Summary
Unable to import a project export which contains merge requests with a null target_branch.
Steps to reproduce
- Create two projects (projectA with id=1 and projectB with id=2) in a fresh/clean server
- In projectA create a branch, target-branch, and commit a change
- In projectA create a second branch, source-branch, and commit a change
- In projectA create an MR from source-branch to target-branch
- In projectA delete target-branch, close MR, and run hosuekeeping
- Export projectA
- In export, change source_project_id of the MR to 2 to simulate the MR having been from a fork
- Import the modified export, fails with 'wrong argument type nil (expected String)'
Links
Customer ticket -> https://gitlab.zendesk.com/agent/tickets/91652 (internal)