diff options
author | Valery Sizov <valery@gitlab.com> | 2016-12-07 11:33:32 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2016-12-07 11:33:32 +0200 |
commit | 67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c (patch) | |
tree | 2418c8d6c0c369023e75d89dec785a5d8f4c0dff /lib/bitbucket/representation/repo.rb | |
parent | 43b7b0ce23d4de7055dc1cdd660b92ff03f4eb1e (diff) | |
download | gitlab-ce-67b7637e5d7d3cf3e3f5cde6e7f984ece368c48c.tar.gz |
Apply review comments. Iteration 1
Diffstat (limited to 'lib/bitbucket/representation/repo.rb')
-rw-r--r-- | lib/bitbucket/representation/repo.rb | 6 |
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 |