summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-04-05 17:22:45 +0000
committerRobert Speicher <robert@gitlab.com>2017-04-05 17:22:45 +0000
commitebdfda69bf8934ee8322e9d863872c5bcc379bcc (patch)
treebd32888dbfa047343e69ce4ce4667c50652fc009 /lib/api
parentfec40d78a799a9cf0f71868053493ce6d34ebbce (diff)
parent56cf0274a00ee4f2e21d6b1d0a41ea1642a1268f (diff)
downloadgitlab-ce-ebdfda69bf8934ee8322e9d863872c5bcc379bcc.tar.gz
Merge branch 'gitaly-refs' into 'master'
Implement Gitaly refs client See merge request !9291
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/internal.rb5
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