diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2018-01-12 18:55:48 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2018-01-15 16:15:54 +0300 |
commit | 49d6ed9ded7d9fad45974eec37c17574d396645b (patch) | |
tree | 78bfd27bb8c59241cae5c06fb159d5d5b8eb1150 /lib/gitlab/gitaly_client/repository_service.rb | |
parent | 26d351ddee5c036a24ff65f3b123290550f2d1f6 (diff) |
Migrate importing repository to Gitaly
Closes gitaly#907
Diffstat (limited to 'lib/gitlab/gitaly_client/repository_service.rb')
-rw-r--r-- | lib/gitlab/gitaly_client/repository_service.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb index 72ee92e78dc..12016aee2a6 100644 --- a/lib/gitlab/gitaly_client/repository_service.rb +++ b/lib/gitlab/gitaly_client/repository_service.rb @@ -100,6 +100,21 @@ module Gitlab ) end + def import_repository(source) + request = Gitaly::CreateRepositoryFromURLRequest.new( + repository: @gitaly_repo, + url: source + ) + + GitalyClient.call( + @storage, + :repository_service, + :create_repository_from_url, + request, + timeout: GitalyClient.default_timeout + ) + end + def rebase_in_progress?(rebase_id) request = Gitaly::IsRebaseInProgressRequest.new( repository: @gitaly_repo, |