gitlab-org--gitlab-foss/lib/gitlab/gitaly_client/notification_service.rb

23 lines
514 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module GitalyClient
2017-07-18 03:59:36 -04:00
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,
2017-07-18 03:59:36 -04:00
:notification_service,
:post_receive,
Gitaly::PostReceiveRequest.new(repository: @gitaly_repo)
)
end
end
end
end