summaryrefslogtreecommitdiff
path: root/app/controllers/projects/hooks_controller.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-08 15:22:04 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-08 15:22:04 +0100
commit15925290eec4f5616e12ef3169794f85150e3270 (patch)
treeb1adb5784f74a05491a38b8656e179f451b79e5e /app/controllers/projects/hooks_controller.rb
parent0c3f70acf4838194f517c02874b8423303c21b48 (diff)
parent51ed5225adf4aac3ccbf715f8647258dac784abb (diff)
downloadgitlab-ce-ui/dashboard-new-issue.tar.gz
Merge branch 'master' into ui/dashboard-new-issueui/dashboard-new-issue
Diffstat (limited to 'app/controllers/projects/hooks_controller.rb')
-rw-r--r--app/controllers/projects/hooks_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/projects/hooks_controller.rb b/app/controllers/projects/hooks_controller.rb
index c7569541899..6a62880cb71 100644
--- a/app/controllers/projects/hooks_controller.rb
+++ b/app/controllers/projects/hooks_controller.rb
@@ -25,13 +25,12 @@ class Projects::HooksController < Projects::ApplicationController
def test
if !@project.empty_repo?
- status = TestHookService.new.execute(hook, current_user)
+ status, message = TestHookService.new.execute(hook, current_user)
if status
flash[:notice] = 'Hook successfully executed.'
else
- flash[:alert] = 'Hook execution failed. '\
- 'Ensure hook URL is correct and service is up.'
+ flash[:alert] = "Hook execution failed: #{message}"
end
else
flash[:alert] = 'Hook execution failed. Ensure the project has commits.'