Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/integrations/packagist.rb')
-rw-r--r--app/models/integrations/packagist.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/integrations/packagist.rb b/app/models/integrations/packagist.rb
index 7177c82a167..7148de66aee 100644
--- a/app/models/integrations/packagist.rb
+++ b/app/models/integrations/packagist.rb
@@ -3,7 +3,6 @@
module Integrations
class Packagist < Integration
include HasWebHook
- extend Gitlab::Utils::Override
field :username,
title: -> { s_('Username') },
@@ -55,12 +54,12 @@ module Integrations
def test(data)
begin
result = execute(data)
- return { success: false, result: result[:message] } if result[:http_status] != 202
+ return { success: false, result: result.message } if result.payload[:http_status] != 202
rescue StandardError => e
- return { success: false, result: e }
+ return { success: false, result: e.message }
end
- { success: true, result: result[:message] }
+ { success: true, result: result.message }
end
override :hook_url