diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-08-22 22:05:44 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-11-22 03:47:26 +0300 |
commit | 267e27b0cd543e8eeaa04686ad4678c4f553c479 (patch) | |
tree | 17970caf33c0d02bf934c7dc27c9c51a136f4ab0 /lib/gitlab/bitbucket_import | |
parent | ceac7878e9b5ba56f31f605c40095e8b83d83b6f (diff) |
Remove code to clone Bitbucket repositories using SSH
Diffstat (limited to 'lib/gitlab/bitbucket_import')
-rw-r--r-- | lib/gitlab/bitbucket_import/key_adder.rb | 24 | ||||
-rw-r--r-- | lib/gitlab/bitbucket_import/key_deleter.rb | 23 |
2 files changed, 0 insertions, 47 deletions
diff --git a/lib/gitlab/bitbucket_import/key_adder.rb b/lib/gitlab/bitbucket_import/key_adder.rb deleted file mode 100644 index 0b63f025d0a..00000000000 --- a/lib/gitlab/bitbucket_import/key_adder.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Gitlab - module BitbucketImport - class KeyAdder - attr_reader :repo, :current_user, :client - - def initialize(repo, current_user, access_params) - @repo, @current_user = repo, current_user - @client = Client.new(access_params[:bitbucket_access_token], - access_params[:bitbucket_access_token_secret]) - end - - def execute - return false unless BitbucketImport.public_key.present? - - project_identifier = "#{repo["owner"]}/#{repo["slug"]}" - client.add_deploy_key(project_identifier, BitbucketImport.public_key) - - true - rescue - false - end - end - end -end diff --git a/lib/gitlab/bitbucket_import/key_deleter.rb b/lib/gitlab/bitbucket_import/key_deleter.rb deleted file mode 100644 index e03c3155b3e..00000000000 --- a/lib/gitlab/bitbucket_import/key_deleter.rb +++ /dev/null @@ -1,23 +0,0 @@ -module Gitlab - module BitbucketImport - class KeyDeleter - attr_reader :project, :current_user, :client - - def initialize(project) - @project = project - @current_user = project.creator - @client = Client.from_project(@project) - end - - def execute - return false unless BitbucketImport.public_key.present? - - client.delete_deploy_key(project.import_source, BitbucketImport.public_key) - - true - rescue - false - end - end - end -end |