const Request = require('request');

module.exports = (user, cb) => {
  Request.get({
    url: `https://api.github.com/users/${user}/repos`,
    headers: {
      'User-Agent': 'GitPom'
    }
  }, cb);
};

const Request = require('request');

module.exports = (options, cb) => {
  Request.get({
    url: `https://api.github.com/repos/${options.repoOwner}/${options.repoName}/issues`,
    headers: {
      'User-Agent': 'GitPom',
      Accept: `application/vnd.github.v3+json`,
      Authorization: `token ${options.access_token}`
    }
  }, cb);
};

Build module to fetch issues for a selected repo
Build module to fetch issues for a selected repo
