From 267cd3e3594dcb1555b5018723f3cc620873499d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Wed, 15 Feb 2017 23:08:30 -0300 Subject: Incorporate Gitaly client for refs service --- lib/api/internal.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/api') diff --git a/lib/api/internal.rb b/lib/api/internal.rb index 523f38d129e..56c597dffcb 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -138,8 +138,11 @@ module API return unless Gitlab::GitalyClient.enabled? + relative_path = Gitlab::RepoPath.strip_storage_path(params[:repo_path]) + project = Project.find_by_full_path(relative_path.sub(/\.(git|wiki)\z/, '')) + begin - Gitlab::GitalyClient::Notifications.new(params[:repo_path]).post_receive + Gitlab::GitalyClient::Notifications.new(project.repository_storage, relative_path).post_receive rescue GRPC::Unavailable => e render_api_error(e, 500) end -- cgit v1.2.1