debian-mirror-gitlab/lib/gitlab/gitaly_client/notification_service.rb
2019-01-03 12:48:30 +05:30

20 lines
483 B
Ruby

module Gitlab
module GitalyClient
class NotificationService
# 'repository' is a Gitlab::Git::Repository
def initialize(repository)
@gitaly_repo = repository.gitaly_repository
@storage = repository.storage
end
def post_receive
GitalyClient.call(
@storage,
:notification_service,
:post_receive,
Gitaly::PostReceiveRequest.new(repository: @gitaly_repo)
)
end
end
end
end