Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Corrected contributors for private repo

  • Loading branch information...
commit c30126a21aec302a3fe23453b8980d597c404c93 1 parent 6064034
@pksunkara authored
Showing with 7 additions and 3 deletions.
  1. +5 −1 lib/police/ask.js
  2. +2 −2 lib/police/github.js
View
6 lib/police/ask.js
@@ -61,7 +61,11 @@ ask.properties = function (pkg, gh) {
ask.gh.repo = repo;
police.github.v2('/repos/show/' + gh.name + '/contributors', function (contrib) {
- ask.gh.contrib = contrib.contributors;
+ if (contrib.contributors) {
+ ask.gh.contrib = contrib.contributors;
+ } else {
+ ask.gh.contrib = [ask.gh.user];
+ }
ask.gh.name = gh.name;
ask.gh.tree = gh.tree;
View
4 lib/police/github.js
@@ -248,9 +248,9 @@ github.v2 = function (uri, callback) {
}, function (err, res, body) {
if (err) police.exit(err);
if (res.statusCode==404) {
- police.winston.warn('Page is MIA (missing in action)'.red.bold);
+ police.winston.warn('Page is MIA (missing in action) but continuing'.red.bold);
police.winston.warn(res.request.uri.href.red);
- police.exit(1);
+ callback({});
} else {
callback(JSON.parse(body));
}
Please sign in to comment.
Something went wrong with that request. Please try again.