summaryrefslogtreecommitdiff
path: root/lib/gitlab/github_import/importer.rb
diff options
context:
space:
mode:
authorDimitrie Hoekstra <dimitrie@gitlab.com>2017-03-17 17:04:51 +0000
committerDimitrie Hoekstra <dimitrie@gitlab.com>2017-03-17 17:04:51 +0000
commitb6bab6ce47813c67ea1e2c7d4fde7d9e320da99c (patch)
tree6c1b7db2aeebc5756c73842cffef22df655cc820 /lib/gitlab/github_import/importer.rb
parent116efdaf128ddcccc30fb82615cd964b35cacc53 (diff)
parentbb1620aaf712c22c61fda098260f481ad79a05e2 (diff)
downloadgitlab-ce-focus-mode-board.tar.gz
Merge branch 'master' into 'focus-mode-board'focus-mode-board
# Conflicts: # app/views/shared/issuable/_filter.html.haml
Diffstat (limited to 'lib/gitlab/github_import/importer.rb')
-rw-r--r--lib/gitlab/github_import/importer.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb
index dc73cad93a5..eea4a91f17d 100644
--- a/lib/gitlab/github_import/importer.rb
+++ b/lib/gitlab/github_import/importer.rb
@@ -171,6 +171,8 @@ module Gitlab
end
def clean_up_restored_branches(pull_request)
+ return if pull_request.opened?
+
remove_branch(pull_request.source_branch_name) unless pull_request.source_branch_exists?
remove_branch(pull_request.target_branch_name) unless pull_request.target_branch_exists?
end