summaryrefslogtreecommitdiff
path: root/lib/gitlab/gitaly_client/notifications.rb
blob: b827a56207f6bb5e9b32704b39c4a71fbbe28f6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Gitlab
  module GitalyClient
    class Notifications
      attr_accessor :stub

      def initialize
        @stub = Gitaly::Notifications::Stub.new(nil, nil, channel_override: GitalyClient.channel)
      end

      def post_receive(repo_path)
        repository = Gitaly::Repository.new(path: repo_path)
        request = Gitaly::PostReceiveRequest.new(repository: repository)
        stub.post_receive(request)
      end
    end
  end
end