Sha256: 65696fe50a76f4188e850f7d34293ba72c3121b5db8c9eab51af5ea01218d4e9

Contents?: true

Size: 722 Bytes

Versions: 109

Compression:

Stored size: 722 Bytes

Contents

/*******************************
          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;

Version data entries

109 entries across 109 versions & 1 rubygems

Version Path
rbbt-rest-1.8.92 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.91 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.90 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.89 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.88 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.87 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.86 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.85 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.84 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.83 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.82 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.81 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.80 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.79 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.78 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.77 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.76 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.75 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.74 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js
rbbt-rest-1.8.73 share/views/public/plugins/semantic-ui/tasks/config/admin/github.js