first commit to new repo

This commit is contained in:
Daniel Ledda
2020-05-10 15:16:01 +02:00
commit a57ad3af42
478 changed files with 90510 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
/*******************************
GitHub Login
*******************************/
/*
Logs into GitHub using OAuth
*/
var
fs = require('fs'),
path = require('path'),
githubAPI = require('github'),
// stores oauth info for GitHub API
oAuthConfig = path.join(__dirname, 'oauth.js'),
oAuth = fs.existsSync(oAuthConfig)
? require(oAuthConfig)
: false,
github
;
if(!oAuth) {
console.error('Must add oauth token for GitHub in tasks/config/admin/oauth.js');
}
github = new githubAPI({
version : '3.0.0',
debug : true,
protocol : 'https',
timeout : 5000
});
github.authenticate({
type: 'oauth',
token: oAuth.token
});
module.exports = github;