Sha256: 75b105bdfa32f3dd536bac9c766c7a2dc4f5a2e19dd417a5d969a924ba1d71e1
Contents?: true
Size: 590 Bytes
Versions: 26
Compression:
Stored size: 590 Bytes
Contents
module Vidar class SentryNotification def initialize(revision:, deploy_config:) @revision = revision @webhook_url = deploy_config.sentry_webhook_url @connection = Faraday.new end def configured? !webhook_url.to_s.empty? end def call connection.post do |req| req.url webhook_url req.headers['Content-Type'] = 'application/json' req.body = data.to_json end end private attr_reader :connection, :revision, :webhook_url def data { "version": revision } end end end
Version data entries
26 entries across 26 versions & 1 rubygems