Sha256: c0714042f6a00ed74ee01f4fc597ff5787a7d2f0c23c359b91927c9dd1a2775a
Contents?: true
Size: 588 Bytes
Versions: 27
Compression:
Stored size: 588 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
27 entries across 27 versions & 1 rubygems