summaryrefslogtreecommitdiff
path: root/app/controllers/projects/service_hook_logs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/service_hook_logs_controller.rb')
-rw-r--r--app/controllers/projects/service_hook_logs_controller.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/controllers/projects/service_hook_logs_controller.rb b/app/controllers/projects/service_hook_logs_controller.rb
index 5c814ea139f..88de0b7ba0d 100644
--- a/app/controllers/projects/service_hook_logs_controller.rb
+++ b/app/controllers/projects/service_hook_logs_controller.rb
@@ -1,20 +1,23 @@
# frozen_string_literal: true
class Projects::ServiceHookLogsController < Projects::HookLogsController
- before_action :service, only: [:show, :retry]
+ extend Gitlab::Utils::Override
+
+ before_action :integration, only: [:show, :retry]
def retry
execute_hook
- redirect_to edit_project_service_path(@project, @service)
+ redirect_to edit_project_service_path(@project, @integration)
end
private
- def hook
- @hook ||= service.service_hook
+ def integration
+ @integration ||= @project.find_or_initialize_integration(params[:service_id])
end
- def service
- @service ||= @project.find_or_initialize_service(params[:service_id])
+ override :hook
+ def hook
+ @hook ||= integration.service_hook || not_found
end
end