diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-02-17 16:59:50 +0100 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-02-24 15:07:24 +0100 |
commit | ad6d6232342558705c54ba70a94f9d7ddbd00f8c (patch) | |
tree | 2114eb91b0ddf6273909c364c1786747cd3d4827 /lib/gitlab/gitlab_import | |
parent | 7561b1c2a486ae57e9fbebadadbe1269bfdba6a0 (diff) | |
download | gitlab-ce-ad6d6232342558705c54ba70a94f9d7ddbd00f8c.tar.gz |
Add Bitbucket importer.
Diffstat (limited to 'lib/gitlab/gitlab_import')
-rw-r--r-- | lib/gitlab/gitlab_import/client.rb | 10 | ||||
-rw-r--r-- | lib/gitlab/gitlab_import/importer.rb | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/gitlab/gitlab_import/client.rb b/lib/gitlab/gitlab_import/client.rb index 2206b68da99..ecf4ff94e39 100644 --- a/lib/gitlab/gitlab_import/client.rb +++ b/lib/gitlab/gitlab_import/client.rb @@ -9,7 +9,7 @@ module Gitlab @client = ::OAuth2::Client.new( config.app_id, config.app_secret, - github_options + gitlab_options ) if access_token @@ -70,12 +70,8 @@ module Gitlab Gitlab.config.omniauth.providers.find{|provider| provider.name == "gitlab"} end - def github_options - { - site: 'https://gitlab.com/', - authorize_url: 'oauth/authorize', - token_url: 'oauth/token' - } + def gitlab_options + OmniAuth::Strategies::GitLab.default_options[:client_options] end end end diff --git a/lib/gitlab/gitlab_import/importer.rb b/lib/gitlab/gitlab_import/importer.rb index 5f9b14399a4..c5304a0699b 100644 --- a/lib/gitlab/gitlab_import/importer.rb +++ b/lib/gitlab/gitlab_import/importer.rb @@ -25,7 +25,7 @@ module Gitlab end comments.each do |comment| - body += @formatter.comment_to_md(comment["author"]["name"], comment["created_at"], comment["body"]) + body += @formatter.comment(comment["author"]["name"], comment["created_at"], comment["body"]) end project.issues.create!( |