How to use the github.Promise function in github

To help you get started, we’ve selected a few github examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github imsky / pull-review / src / github / index.js View on Github external
var fs = require('fs');
var path = require('path');

var Promise = require('native-promise-only');
var Github = require('github');
Github.Promise = Github.Promise || Promise;
var debug = require('debug');

var BlameRange = require('../models/blame-range');

var GraphQLRequest = require('./graphql');

var log = debug('pull-review');

var blameQuery = fs.readFileSync(
  path.join(__dirname, 'git-blame.graphql'),
  'utf8'
);

var github;
var token;