From c587551a68872cb6a6792ad18da26cadcb5d985c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 1 Dec 2017 16:04:27 +0100 Subject: [PATCH] Add release channel to url --- index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 284ad21..974980a 100644 --- a/index.js +++ b/index.js @@ -3,10 +3,15 @@ module.exports = ({ url, iosManifest, config }) => { const slack = require('slack-notify')(webhookUrl); return new Promise((resolve, reject) => { + + const releaseChannel = iosManifest.releaseChannel || 'default'; + const queryString = releaseChannel === 'default' ? '' : + '?release-channel='+encodeURIComponent(releaseChannel) + slack.send( { icon_url: iosManifest.iconUrl, - text: `${iosManifest.name} v${iosManifest.version} published to ${url}`, + text: `${iosManifest.name} v${iosManifest.version} published to ${url + queryString}`, unfurl_links: 0, username: config.username || 'ExpoBot', },