class Github::Usecase

Defined in:

github/usecase.cr

Constant Summary

BODY_LIMIT = 500

コメント本文の掲載上限。全文はリンク先で読む前提で、通知が長文で流れるのを 防ぐため組み立て側(Slack / Discord 共通)で切り詰める(issue #96)。

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(repo : NotificationRepository, exclude_labels : Set(String) = Set(String).new) #

exclude_labels はメンションの対象から外すラベル名(parse_labels で正規化した集合)。


[View source]

Class Method Detail

def self.parse_labels(raw : String | Nil) : Set(String) #

カンマ区切りのラベル名(環境変数 EXCLUDE_LABELS)を集合にする。 GitHub のラベル名は大文字小文字を区別しないため、比較用に小文字へ揃える。 前後の空白と空要素(末尾のカンマなど)は設定の揺れとして読み捨てる。


[View source]

Instance Method Detail

def build_message(notify : Notification) : Notify::Message #

[View source]