Fix GitHub Import deleting branches for open PRs from a fork
What does this MR do?
There is another Edge Case for GitHub imports described here: gitlab-org/gitlab-ce#29046. When we recreate the branches during the import, we should not remove it if the PR is still open.
Are there points in the code the reviewer needs to double check?
Make sure you have a case to test on. I'm using https://github.com/xiaogangwen/my-awesome-project/pull/13 as base to test this failure.
Why was this MR needed?
While the PR is created, because the branch was removed, we actually "lost" data.
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #29046 (closed)