summaryrefslogtreecommitdiff
path: root/lib/bitbucket/representation/repo.rb
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-12-07 11:33:32 +0200
committerValery Sizov <valery@gitlab.com>2016-12-07 11:33:32 +0200
commit67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c (patch)
tree2418c8d6c0c369023e75d89dec785a5d8f4c0dff /lib/bitbucket/representation/repo.rb
parent43b7b0ce23d4de7055dc1cdd660b92ff03f4eb1e (diff)
downloadgitlab-ce-67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c.tar.gz
Apply review comments. Iteration 1
Diffstat (limited to 'lib/bitbucket/representation/repo.rb')
-rw-r--r--lib/bitbucket/representation/repo.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/bitbucket/representation/repo.rb b/lib/bitbucket/representation/repo.rb
index b291dfe0441..8969ecd1c19 100644
--- a/lib/bitbucket/representation/repo.rb
+++ b/lib/bitbucket/representation/repo.rb
@@ -23,7 +23,9 @@ module Bitbucket
url = raw['links']['clone'].find { |link| link['name'] == 'https' }.fetch('href')
if token.present?
- url.sub(/^[^\@]*/, "https://x-token-auth:#{token}")
+ clone_url = URI::parse(url)
+ clone_url.user = "x-token-auth:#{token}"
+ clone_url.to_s
else
url
end
@@ -37,7 +39,7 @@ module Bitbucket
raw['full_name']
end
- def has_issues?
+ def issues_enabled?
raw['has_issues']
end