summaryrefslogtreecommitdiff
path: root/lib/gitlab/gitaly_client/notifications.rb
blob: 78ed433e6b8658ad2faa38522b71bd3fc95183e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
module Gitlab
  module GitalyClient
    class Notifications
      # 'repository' is a Gitlab::Git::Repository
      def initialize(repository)
        @gitaly_repo = repository.gitaly_repository
        @storage = repository.storage
      end

      def post_receive
        GitalyClient.call(
          @storage,
          :notifications,
          :post_receive,
          Gitaly::PostReceiveRequest.new(repository: @gitaly_repo)
        )
      end
    end
  end
end