diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-02-15 23:08:30 -0300 |
---|---|---|
committer | Jacob Vosmaer <jacob@gitlab.com> | 2017-04-04 16:53:44 +0200 |
commit | 267cd3e3594dcb1555b5018723f3cc620873499d (patch) | |
tree | 323bdac4cd84427ed64b9d2a0065eff9e762c340 /lib/api/internal.rb | |
parent | 3301f4a22b685975d664ea8abdd7c43b3e929e5a (diff) | |
download | gitlab-ce-267cd3e3594dcb1555b5018723f3cc620873499d.tar.gz |
Incorporate Gitaly client for refs service
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r-- | lib/api/internal.rb | 5 |
1 files changed, 4 insertions, 1 deletions
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 |