diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-02-05 15:04:23 -0300 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2017-03-01 18:46:59 -0300 |
commit | f8fa6e6f472179cfd9261a35d309d986f8db8ebd (patch) | |
tree | dcbaa836cbc91c15fc0aa77e5610a23f874b1934 /lib/api/internal.rb | |
parent | b6a945b39354ec2b2c09fc5f6904dfbf8990df26 (diff) | |
download | gitlab-ce-f8fa6e6f472179cfd9261a35d309d986f8db8ebd.tar.gz |
Add internal endpoint to notify post-receive to Gitalygitaly-post-receive
Diffstat (limited to 'lib/api/internal.rb')
-rw-r--r-- | lib/api/internal.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/api/internal.rb b/lib/api/internal.rb index d235977fbd8..7eed93aba00 100644 --- a/lib/api/internal.rb +++ b/lib/api/internal.rb @@ -132,6 +132,18 @@ module API { success: true, recovery_codes: codes } end + + post "/notify_post_receive" do + status 200 + + return unless Gitlab::GitalyClient.enabled? + + begin + Gitlab::GitalyClient::Notifications.new.post_receive(params[:repo_path]) + rescue GRPC::Unavailable => e + render_api_error(e, 500) + end + end end end end |