Commit 98a3a762 authored by Rémy Coutable's avatar Rémy Coutable

Fix JenkinsService#test implementation

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 8a881069
...@@ -35,13 +35,13 @@ class JenkinsService < CiService ...@@ -35,13 +35,13 @@ class JenkinsService < CiService
def test(data) def test(data)
begin begin
code, message = execute(data) result = execute(data)
return { success: false, result: message } if code != 200 return { success: false, result: result[:message] } if result[:http_status] != 200
rescue StandardError => error rescue StandardError => error
return { success: false, result: error } return { success: false, result: error }
end end
{ success: true, result: message } { success: true, result: result[:message] }
end end
def hook_url def hook_url
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment