diff options
author | Stan Hu <stanhu@gmail.com> | 2016-11-21 20:49:40 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-11-21 20:49:40 -0800 |
commit | 402cc95c1a1df8168467f74e21c6df7d48359714 (patch) | |
tree | f95e6b587a7e996fa81219b269c344a972e939bd /lib | |
parent | 0b72994b63dbbbddaf0e77629249d92890a6e4a4 (diff) | |
download | gitlab-ce-402cc95c1a1df8168467f74e21c6df7d48359714.tar.gz |
Fix Bitbucket importer spec to pass with 2.0 API
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bitbucket/page.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/bitbucket_import/importer.rb | 7 |
2 files changed, 2 insertions, 9 deletions
diff --git a/lib/bitbucket/page.rb b/lib/bitbucket/page.rb index b91a173b53c..49d083cc66f 100644 --- a/lib/bitbucket/page.rb +++ b/lib/bitbucket/page.rb @@ -22,10 +22,10 @@ module Bitbucket attrs.map { |attr| { attr.to_sym => raw[attr] } }.reduce(&:merge) end - def parse_values(raw, representation_class) + def parse_values(raw, bitbucket_rep_class) return [] unless raw['values'] && raw['values'].is_a?(Array) - raw['values'].map { |hash| representation_class.new(hash) } + raw['values'].map { |hash| bitbucket_rep_class.new(hash) } end def representation_class(type) diff --git a/lib/gitlab/bitbucket_import/importer.rb b/lib/gitlab/bitbucket_import/importer.rb index 1f7a691e6dd..729b465e861 100644 --- a/lib/gitlab/bitbucket_import/importer.rb +++ b/lib/gitlab/bitbucket_import/importer.rb @@ -62,13 +62,6 @@ module Gitlab ) end end - - project.issues.create!( - description: body, - title: issue["title"], - state: %w(resolved invalid duplicate wontfix closed).include?(issue["status"]) ? 'closed' : 'opened', - author_id: gitlab_user_id(project, reporter) - ) end rescue ActiveRecord::RecordInvalid nil |