You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2014/04/29 15:54:32 UTC

[2/2] git commit: Fix list-pulls stopping if a repo has no pull requests

Fix list-pulls stopping if a repo has no pull requests


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

Branch: refs/heads/master
Commit: 8ce13077bb44a5c80fd513199d1712327c9d03f2
Parents: cd1a9e6
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Apr 29 09:54:15 2014 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Tue Apr 29 09:54:15 2014 -0400

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


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/8ce13077/src/list-pulls.js
----------------------------------------------------------------------
diff --git a/src/list-pulls.js b/src/list-pulls.js
index d7e16e3..b2110ea 100644
--- a/src/list-pulls.js
+++ b/src/list-pulls.js
@@ -29,6 +29,9 @@ var commentFailed = false;
 
 function addLastCommentInfo(repo, pullRequests, callback) {
     var remaining = pullRequests.length;
+    if (remaining === 0) {
+        callback();
+    }
     pullRequests.forEach(function(pullRequest) {
         // review_comments_url is always empty, so resort to scraping.
         request.get({ url: 'https://github.com/apache/' + repo + '/pull/' + pullRequest.number, headers: { 'User-Agent': 'Cordova Coho' }}, function(err, res, payload) {