You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2017/05/10 23:48:10 UTC

cordova-coho git commit: Added Github Bad Credentials handler

Repository: cordova-coho
Updated Branches:
  refs/heads/master f7c5a7264 -> dff934af6


Added Github Bad Credentials handler


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/dff934af
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/dff934af
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/dff934af

Branch: refs/heads/master
Commit: dff934af6b2c78eaae01046e503c829023fbc9c0
Parents: f7c5a72
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Wed May 10 16:48:04 2017 -0700
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Wed May 10 16:48:04 2017 -0700

----------------------------------------------------------------------
 src/list-pulls.js | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/dff934af/src/list-pulls.js
----------------------------------------------------------------------
diff --git a/src/list-pulls.js b/src/list-pulls.js
index 65fe63e..7545d2a 100644
--- a/src/list-pulls.js
+++ b/src/list-pulls.js
@@ -128,6 +128,11 @@ function listGitHubPullRequests(repo, maxAge, hideUser, short, statsOnly, callba
         pullRequests = JSON.parse(pullRequests);
         var origCount = pullRequests.length;
 
+        if (pullRequests.message === 'Bad credentials') {
+            apputil.fatal('Error: GitHub Bad credentials. Check your CORDOVA_GIT_ACCOUNT environment variable which should be set with your Github API token: https://github.com/settings/tokens.', 
+            'CORDOVA_GIT_ACCOUNT used: ' + process.env['CORDOVA_GIT_ACCOUNT']);
+        } 
+
         pullRequests = pullRequests.filter(function(p) {
             var updatedDate = new Date(p.updated_at);
             var daysAgo = Math.round((new Date() - updatedDate) / (60 * 60 * 24 * 1000));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org