debian-mirror-gitlab/lib/gitlab/gitaly_client/notification_service.rb

23 lines
514 B
Ruby
Raw Normal View History

2018-12-23 12:14:25 +05:30
# frozen_string_literal: true
2017-09-10 17:25:29 +05:30
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