Skip to content
Snippets Groups Projects
Commit 23a3e375 authored by Jacob Vosmaer (GitLab)'s avatar Jacob Vosmaer (GitLab)
Browse files

Inform user about questionable hook success

parent f4e0c562
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -27,8 +27,10 @@ class Projects::HooksController < Projects::ApplicationController
if !@project.empty_repo?
status, message = TestHookService.new.execute(hook, current_user)
 
if status
flash[:notice] = "Hook successfully executed, HTTP #{status} #{message}"
if status && status >= 200 && status < 400
flash[:notice] = "Hook executed successfully"
elsif status
flash[:alert] = "Hook executed successfully but returned HTTP #{status} #{message}"
else
flash[:alert] = "Hook execution failed: #{message}"
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment