Skip to content

Instantly share code, notes, and snippets.

@brentvatne
Created May 5, 2017 20:13
Show Gist options
  • Select an option

  • Save brentvatne/ffc70d851c5ee8a72bf9ed4e4ebad2b7 to your computer and use it in GitHub Desktop.

Select an option

Save brentvatne/ffc70d851c5ee8a72bf9ed4e4ebad2b7 to your computer and use it in GitHub Desktop.
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