Welcome to mirror list, hosted at ThFree Co, Russian Federation.

notifications.rb « gitaly_client « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 719554eac52772acc12ed1fd3ad00f4526f7073a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Gitlab
  module GitalyClient
    class Notifications
      attr_accessor :stub

      # 'repository' is a Gitlab::Git::Repository
      def initialize(repository)
        @gitaly_repo = repository.gitaly_repository
        @stub = GitalyClient.stub(:notifications, repository.storage)
      end

      def post_receive
        request = Gitaly::PostReceiveRequest.new(repository: @gitaly_repo)
        @stub.post_receive(request)
      end
    end
  end
end