Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-02-17 18:59:50 +0300
committerDouwe Maan <douwe@gitlab.com>2015-02-24 17:07:24 +0300
commitad6d6232342558705c54ba70a94f9d7ddbd00f8c (patch)
tree2114eb91b0ddf6273909c364c1786747cd3d4827 /lib/gitlab/gitlab_import
parent7561b1c2a486ae57e9fbebadadbe1269bfdba6a0 (diff)
Add Bitbucket importer.
Diffstat (limited to 'lib/gitlab/gitlab_import')
-rw-r--r--lib/gitlab/gitlab_import/client.rb10
-rw-r--r--lib/gitlab/gitlab_import/importer.rb2
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!(