Unable to Reopen Merge Request After Retaining Deleted Fork
Summary
Merge requests created from a forked repository cannot be reopened after the fork is deleted and then retained. The error message The source branch of this merge request has been removed persists even though the fork and source branch are restored.
Steps to reproduce
- Fork a project
- Create one or more merge requests from the fork to the upstream project.
- Delete the forked project via Settings > General > Advanced > Delete project.
- Observe the merge requests are automatically closed with an error saying the source branch has been removed.
- Retain the deleted fork by clicking the link in the email GitLab sends.
- Navigate to the forked repo and confirm the project and source branches are intact.
- Try to reopen the previously closed merge requests.
Example Project
- Fork: https://gitlab.com/zakaria-fatahi/docs-gitlab-com
- MR1: gitlab-org/technical-writing/docs-gitlab-com!662 (closed)
- MR2: gitlab-org/technical-writing/docs-gitlab-com!617 (closed)
What is the current bug behavior?
Merge requests remain closed and cannot be reopened. The error message about the missing source branch still appears, even though the project and branches have been restored via the "retain" link.
What is the expected correct behavior?
Once the project and its branches are retained (restored), associated merge requests should be reopenable, and GitLab should recognize the source branch as available again.
Relevant logs and/or screenshots
Screen_Recording_2025-05-23_at_18.52.36
Output of checks
This bug happens on GitLab.com
Possible fixes
You can now submit this issue under the GitLab project at https://gitlab.com/gitlab-org/gitlab/-/issues using the "New Issue" button and paste the formatted content above.

