summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-06-03 12:43:12 +0000
committerDouwe Maan <douwe@gitlab.com>2016-06-03 12:43:12 +0000
commit3c713de0c4a169ce64b3110aec85f9f0f382240a (patch)
treede112a8179575b00ee9d1de70d7609002a10925d /lib
parent0e2490c0cb9fca00baac08ae6b1280f62fa7d336 (diff)
parent3b4f03de8fb0de0b882d499c9259f053fa69d9e6 (diff)
downloadgitlab-ce-3c713de0c4a169ce64b3110aec85f9f0f382240a.tar.gz
Merge branch 'gh-branch-cleanup' into 'master'
Ensure branch cleanup regardless of whether the GitHub import process succeeds Closes #17766 See merge request !4450
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/github_import/importer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/github_import/importer.rb b/lib/gitlab/github_import/importer.rb
index 408d9b79632..9d077e79c39 100644
--- a/lib/gitlab/github_import/importer.rb
+++ b/lib/gitlab/github_import/importer.rb
@@ -89,11 +89,11 @@ module Gitlab
end
end
- delete_refs(branches_removed)
-
true
rescue ActiveRecord::RecordInvalid => e
raise Projects::ImportService::Error, e.message
+ ensure
+ delete_refs(branches_removed)
end
def create_refs(branches)