From 0dc2a1c0b41f793d637300e8863e2839a6c0c168 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Mon, 19 Sep 2016 13:17:52 +0200 Subject: [PATCH] Reverse order of commits; --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index e4bc9fc..14b47aa 100644 --- a/index.js +++ b/index.js @@ -80,7 +80,7 @@ var handlers = { say(msg); } else { var maybeS = numCommits === 1 ? '' : 's'; - var lastCommit = commits[commits.length - 1]; + var lastCommit = commits[0]; var lastCommitMessage = lastCommit.message.trim().split('\n')[0].trim(); shortenURL(lastCommit.url, function(shortUrl) { msg = 'push on ' + projectName + '@' + branchName + ' (by ' + user + '): ' +