diff --git a/src/api/service/github.ts b/src/api/service/github.ts index c811a38da9480625c5ee8ec48eaca5d1a1261cd3..c2414930edd3aaced4a6d04d75d711570b5a9fbb 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) {