Sha256: 4f9941a6a7645f099e00d5171b8d460a3c1cd285a9356b54e7ca74274b02c95a
Contents?: true
Size: 821 Bytes
Versions: 140
Compression:
Stored size: 821 Bytes
Contents
module Gitlab module QA module Slack class PostToSlack def initialize(message:, icon_emoji: Runtime::Env.slack_icon_emoji, channel: Runtime::Env.slack_qa_channel) @channel = channel @message = message @icon_emoji = icon_emoji end def invoke! Runtime::Env.require_slack_qa_channel! unless @channel Runtime::Env.require_ci_slack_webhook_url! params = {} params['channel'] = @channel params['username'] = "GitLab QA Bot" params['icon_emoji'] = @icon_emoji params['text'] = @message url = Runtime::Env.ci_slack_webhook_url Support::HttpRequest.make_http_request(method: 'post', url: url, params: params, show_response: true) end end end end end
Version data entries
140 entries across 140 versions & 1 rubygems