Prevent running script without a token

This commit is contained in:
Julien Bisconti 2018-05-29 00:07:41 +02:00 committed by Andreas Gebhardt
parent a60278793f
commit 0c24343c82

View File

@ -5,6 +5,10 @@ process.on('unhandledRejection', error => {
console.log('unhandledRejection', error.message); console.log('unhandledRejection', error.message);
}); });
if (!process.env.TOKEN) {
throw new Error('no github token found');
}
const readme = 'README.md'; const readme = 'README.md';
const API = 'https://api.github.com/'; const API = 'https://api.github.com/';
const options = { const options = {