Class: Ci::Pipelines::HookService

Inherits:
Object
  • Object
show all
Includes:
Gitlab::Utils::StrongMemoize
Defined in:
app/services/ci/pipelines/hook_service.rb

Constant Summary collapse

HOOK_NAME =
:pipeline_hooks

Instance Method Summary collapse

Constructor Details

#initialize(pipeline) ⇒ HookService

Returns a new instance of HookService.



10
11
12
# File 'app/services/ci/pipelines/hook_service.rb', line 10

def initialize(pipeline)
  @pipeline = pipeline
end

Instance Method Details

#executeObject



14
15
16
17
# File 'app/services/ci/pipelines/hook_service.rb', line 14

def execute
  project.execute_hooks(hook_data, HOOK_NAME) if project.has_active_hooks?(HOOK_NAME)
  project.execute_integrations(hook_data, HOOK_NAME) if project.has_active_integrations?(HOOK_NAME)
end