Browse Source

Delay the message when ignoring the node version

master
Matheus Fernandes 8 years ago
parent
commit
f8d345dc17
No known key found for this signature in database GPG Key ID: DD07CA4EA7B65C4F
  1. 9
      scripts/slack.js

9
scripts/slack.js

@ -65,8 +65,13 @@ fetch(`https://api.github.com/repos/${repo}/commits/${commit}`, opts)
console.log(`Couldn't send messages/files to Slack`, err);
}
} else {
const message = `:white_check_mark: Build succeded on Node ${currentNodeVersion} (commit <https://github.com/${repo}/commit/${commit}|${commit.substr(0, 7)}> by <${res.authorUrl}|${res.authorName}>)`;
await slackup({ apiKey, channel, type: 'message', message });
setTimeout(
async () => {
const message = `:white_check_mark: Build succeded on Node ${currentNodeVersion} (commit <https://github.com/${repo}/commit/${commit}|${commit.substr(0, 7)}> by <${res.authorUrl}|${res.authorName}>)`;
await slackup({ apiKey, channel, type: 'message', message });
},
3000
);
}
})
.catch(console.error);

Loading…
Cancel
Save