2019-12-17 15:08:15 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class Projects::ServiceHookLogsController < Projects::HookLogsController
|
2021-06-23 18:07:10 +00:00
|
|
|
before_action :integration, only: [:show, :retry]
|
2019-12-17 15:08:15 +00:00
|
|
|
|
|
|
|
def retry
|
|
|
|
execute_hook
|
2021-06-23 18:07:10 +00:00
|
|
|
redirect_to edit_project_service_path(@project, @integration)
|
2019-12-17 15:08:15 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def hook
|
2021-06-23 18:07:10 +00:00
|
|
|
@hook ||= integration.service_hook
|
2019-12-17 15:08:15 +00:00
|
|
|
end
|
|
|
|
|
2021-06-23 18:07:10 +00:00
|
|
|
def integration
|
|
|
|
@integration ||= @project.find_or_initialize_integration(params[:service_id])
|
|
|
|
@service = @integration # TODO: remove when https://gitlab.com/gitlab-org/gitlab/-/issues/330300 is complete
|
2019-12-17 15:08:15 +00:00
|
|
|
end
|
|
|
|
end
|