[CI] 새 PR이 올라오면 답글 달고, 빌드하기
C.EventSource<NewPullRequest>("pjc0247", "Rinity")
.Task<WriteIssueComment>()
.In<ConstantTemplate>(WriteIssueComment.IN_Message,
"Thank you for your contribution. We'll review your PR and reply soon.")
.Task<CakeBuild>("src")
.Task<SetPullRequestStatus>();
[IoT] Blink the light if there's new comment in Github
using Chain.Hue;
C.EventSource<NewIssueComment>("pjc0247", "Rinity")
.Filter<MessageContains>("@pjc0247")
.Task<TurnOnLight>()
.Task<Delay>(1000)
.Task<TurnOffLight();
[HTTP] Simple REST API Server
using Chain.HttpServ;
C.EventSource<HttpServer>(8080)
.Filter<PostRequest>()
.Task<MapUri>("issue/{issue_no}/comment")
.Task<MapBody>("body")
.Task<WriteIssueComment>("pjc0247", "Rinity")
.In(WriteIssueComment.IN_IssueNo, "issue_no")
.In(WriteIssueComment.IN_Message, "body");
[Daemon] CPU Monitor
C.EventSource<Chain.SystemMonitor.CpuUsage>()
.Filter<Chain.SystemMonitor.CpuUsageInfo>(x => x.Value >= 30)
.Task<SendMail>()
.Set(SendMail.IN_Receiver, "[email protected]")
.Set(SendMail.IN_Subject, "CPU usage alert")
.Set(SendMail.IN_Body, "CPU usage over 30%");