diff options
Diffstat (limited to 'lib/gitlab/kas/client.rb')
-rw-r--r-- | lib/gitlab/kas/client.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/gitlab/kas/client.rb b/lib/gitlab/kas/client.rb index 768810d5545..43546d04087 100644 --- a/lib/gitlab/kas/client.rb +++ b/lib/gitlab/kas/client.rb @@ -8,7 +8,8 @@ module Gitlab STUB_CLASSES = { agent_tracker: Gitlab::Agent::AgentTracker::Rpc::AgentTracker::Stub, - configuration_project: Gitlab::Agent::ConfigurationProject::Rpc::ConfigurationProject::Stub + configuration_project: Gitlab::Agent::ConfigurationProject::Rpc::ConfigurationProject::Stub, + notifications: Gitlab::Agent::Notifications::Rpc::Notifications::Stub }.freeze ConfigurationError = Class.new(StandardError) @@ -39,6 +40,18 @@ module Gitlab .to_a end + def send_git_push_event(project:) + request = Gitlab::Agent::Notifications::Rpc::GitPushEventRequest.new( + project: Gitlab::Agent::Notifications::Rpc::Project.new( + id: project.id, + full_path: project.full_path + ) + ) + + stub_for(:notifications) + .git_push_event(request, metadata: metadata) + end + private def stub_for(service) |