From 713e9ad5f4f128fad9ebad524332b2338e72f749 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 16 Nov 2018 23:09:33 +0900 Subject: [PATCH] Resolve #3274 --- src/server/api/service/github-bot.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/server/api/service/github-bot.ts b/src/server/api/service/github-bot.ts index e109545b60..b04f76ba07 100644 --- a/src/server/api/service/github-bot.ts +++ b/src/server/api/service/github-bot.ts @@ -124,6 +124,17 @@ handler.on('issue_comment', event => { post(text); }); +handler.on('release', event => { + const action = event.action; + const release = event.release; + let text: string; + switch (action) { + case 'published': text = `🎁 **NEW RELEASE**: [${release.tag_name}](${release.html_url})`; break; + default: return; + } + post(text); +}); + handler.on('watch', event => { const sender = event.sender; post(`(((⭐️))) Starred by **${sender.login}** (((⭐️)))`, false);