Created
May 5, 2017 20:13
-
-
Save brentvatne/ffc70d851c5ee8a72bf9ed4e4ebad2b7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = ({ url, iosManifest, config }) => { | |
| const { webhookUrl } = config; | |
| const slack = require('slack-notify')(webhookUrl); | |
| return new Promise((resolve, reject) => { | |
| slack.send( | |
| { | |
| icon_url: iosManifest.iconUrl, | |
| text: `${iosManifest.name} v${iosManifest.version} published to ${url}`, | |
| unfurl_links: 0, | |
| username: config.username || 'ExpoBot', | |
| }, | |
| err => { | |
| if (err) { | |
| reject(err); | |
| } else { | |
| resolve('Posted notification to Slack!'); | |
| } | |
| } | |
| ); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment