diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /app/controllers/admin/hook_logs_controller.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'app/controllers/admin/hook_logs_controller.rb')
-rw-r--r-- | app/controllers/admin/hook_logs_controller.rb | 37 |
1 files changed, 10 insertions, 27 deletions
diff --git a/app/controllers/admin/hook_logs_controller.rb b/app/controllers/admin/hook_logs_controller.rb index aa13673095d..a283d3abb0b 100644 --- a/app/controllers/admin/hook_logs_controller.rb +++ b/app/controllers/admin/hook_logs_controller.rb @@ -1,34 +1,17 @@ # frozen_string_literal: true -class Admin::HookLogsController < Admin::ApplicationController - include ::Integrations::HooksExecution +module Admin + class HookLogsController < Admin::ApplicationController + include WebHooks::HookLogActions - before_action :hook, only: [:show, :retry] - before_action :hook_log, only: [:show, :retry] + private - respond_to :html + def hook + @hook ||= SystemHook.find(params[:hook_id]) + end - feature_category :integrations - urgency :low, [:retry] - - 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]) + def after_retry_redirect_path + edit_admin_hook_path(hook) + end end end |