summaryrefslogtreecommitdiff
path: root/app/controllers/projects/service_hook_logs_controller.rb
blob: 88de0b7ba0d7a17fe141408bdd0a0dc7316fd692 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

class Projects::ServiceHookLogsController < Projects::HookLogsController
  extend Gitlab::Utils::Override

  before_action :integration, only: [:show, :retry]

  def retry
    execute_hook
    redirect_to edit_project_service_path(@project, @integration)
  end

  private

  def integration
    @integration ||= @project.find_or_initialize_integration(params[:service_id])
  end

  override :hook
  def hook
    @hook ||= integration.service_hook || not_found
  end
end