class Notify::Message

Overview

送信先に依存しない中立な通知メッセージ。 Slack / Discord などのアダプタがそれぞれの形式へ変換する。

Defined in:

notify/models.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(mention : Bool = false, important : Bool = false, author_name : Nil | String = nil, author_icon : Nil | String = nil, author_link : Nil | String = nil, pretext : Nil | String = nil, color : Nil | String = nil, title : Nil | String = nil, title_link : Nil | String = nil, text : Nil | String = nil, footer : Nil | String = nil, footer_icon : Nil | String = nil) #

[View source]

Instance Method Detail

def author_icon : String | Nil #

[View source]
def author_link : String | Nil #

[View source]
def author_name : String | Nil #

[View source]
def color : String | Nil #

[View source]
def footer : String | Nil #

[View source]
def footer_icon : String | Nil #

[View source]
def important? : Bool #

重要度の高い(自分宛ての)通知か。メンション対象かどうかで投稿を区切り、 @channel 付きの投稿に自分宛て以外を混ぜないために使う(issue #120)。

mention? とは別に持つ。mention? は CI が赤い PR でチャンネル全体を叩かない ための抑止(issue #105)が掛かった後の値で、抑止されても通知の重要度自体は 下がらない。両者を同じフラグにすると、CI が赤いレビュー依頼が通常の通知に 混ざってしまう。


[View source]
def mention? : Bool #

[View source]
def pretext : String | Nil #

[View source]
def text : String | Nil #

[View source]
def title : String | Nil #

[View source]
def title_link : String | Nil #

[View source]