Skip to content

Fix GitHub Import deleting branches for open PRs from a fork

Gabriel Mazetto requested to merge 29046-fix-github-importer-open-prs into master

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?

What are the relevant issue numbers?

Closes #29046 (closed)

Merge request reports