index.js
function fetchRepoREADME (repo) {
  request({
    uri: 'https://api.github.com/repos/' + repo + '/readme',
    headers: _.extend(headers, {

      // Get raw README content
      'Accept': 'application/vnd.github.VERSION.raw'
    })
  },
  function (error, response, body) {
    if (!error && response.statusCode === 200) {
      lintMarkdown(body, repo);
    } else {
      if (response.headers['x-ratelimit-remaining'] === '0') {
        getAuthToken();
      } else {
        console.log('README for https://github.com/' + repo.blue + ' not found.'.red);
        return;
      }
    }
  });
}
function fetchRepoREADME (repo) {
  request({
    uri: 'https://api.github.com/repos/' + repo + '/readme',
    headers: _.extend(headers, {

      // Get raw README content
      'Accept': 'application/vnd.github.VERSION.raw'
    })
  },
  function (error, response, body) {
    if (!error && response.statusCode === 200) {
      lintMarkdown(body, repo);
    } else {
      if (response.headers['x-ratelimit-remaining'] === '0') {
        getAuthToken();
      } else {
        console.log('README for https://github.com/' + repo.blue + ' not found.'.red);
        return;
      }
    }
  });
}
function fetchRepoREADME ( repo ) { request ( { uri : 'https://api.github.com/repos/' + repo + '/readme' , headers : _ . extend ( headers , { // Get raw README content 'Accept' : 'application/vnd.github.VERSION.raw' } ) } , function ( error , response , body ) { if ( ! error && response . statusCode === 200 ) { lintMarkdown ( body , repo ) ; } else { if ( response . headers [ 'x-ratelimit-remaining' ] === '0' ) { getAuthToken ( ) ; } else { console . log ( 'README for https://github.com/' + repo . blue + ' not found.' . red ) ; return ; } } } ) ; }
Fetches a README from GitHub
@param  {String} repo URL of repo to fetch
Fetches a README from GitHub