73322a0e55
Enables frozen string for the following: * app/controllers/*.rb * app/controllers/admin/**/*.rb * app/controllers/boards/**/*.rb * app/controllers/ci/**/*.rb * app/controllers/concerns/**/*.rb Partially addresses #47424.
31 lines
580 B
Ruby
31 lines
580 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Admin::HookLogsController < Admin::ApplicationController
|
|
include HooksExecution
|
|
|
|
before_action :hook, only: [:show, :retry]
|
|
before_action :hook_log, only: [:show, :retry]
|
|
|
|
respond_to :html
|
|
|
|
def show
|
|
end
|
|
|
|
def retry
|
|
result = hook.execute(hook_log.request_data, hook_log.trigger)
|
|
|
|
set_hook_execution_notice(result)
|
|
|
|
redirect_to edit_admin_hook_path(@hook)
|
|
end
|
|
|
|
private
|
|
|
|
def hook
|
|
@hook ||= SystemHook.find(params[:hook_id])
|
|
end
|
|
|
|
def hook_log
|
|
@hook_log ||= hook.web_hook_logs.find(params[:id])
|
|
end
|
|
end
|