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/unify_circuit.rb')
-rw-r--r--app/models/integrations/unify_circuit.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/models/integrations/unify_circuit.rb b/app/models/integrations/unify_circuit.rb
index f10a75fac5d..aa19133b8c2 100644
--- a/app/models/integrations/unify_circuit.rb
+++ b/app/models/integrations/unify_circuit.rb
@@ -29,7 +29,7 @@ module Integrations
def default_fields
[
- { type: 'text', name: 'webhook', placeholder: "https://yourcircuit.com/rest/v2/webhooks/incoming/…", required: true },
+ { type: 'text', name: 'webhook', help: 'https://yourcircuit.com/rest/v2/webhooks/incoming/…', required: true },
{ type: 'checkbox', name: 'notify_only_broken_pipelines' },
{
type: 'select',
@@ -43,11 +43,13 @@ module Integrations
private
def notify(message, opts)
- response = Gitlab::HTTP.post(webhook, body: {
+ body = {
subject: message.project_name,
text: message.summary,
markdown: true
- }.to_json)
+ }
+
+ response = Gitlab::HTTP.post(webhook, body: Gitlab::Json.dump(body))
response if response.success?
end