From 411ed3413fe4facf4e74cbe21bf0fc6e5c4f0b1d Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 18 Mar 2017 01:42:43 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/service/github.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/api/service/github.ts b/src/api/service/github.ts index c811a38da..c2414930e 100644 --- a/src/api/service/github.ts +++ b/src/api/service/github.ts @@ -29,6 +29,16 @@ module.exports = async (app: express.Application) => { } }); + handler.on('status', event => { + const state = event.state; + switch (state) { + case 'failure': + const commit = event.commit.commit; + post(`⚠️🚨BUILD FAILED🚨⚠️: ?[${commit.message}](${commit.url})`); + break; + } + }); + handler.on('push', event => { const ref = event.ref; switch (ref) {