From 2492fcf83f5892cfeb3491742c4556c53d8f5d5c Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 28 Jun 2017 11:34:09 +0200 Subject: [PATCH] Fix ordering of commits in MRs... again; --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 7832c1d..31f1dd8 100644 --- a/index.js +++ b/index.js @@ -92,7 +92,7 @@ var handlers = { say(msg); } else { var maybeS = numCommits === 1 ? '' : 's'; - var lastCommit = commits[0]; + var lastCommit = commits[commits.length - 1]; var lastCommitMessage = lastCommit.message.trim().split('\n')[0].trim(); shortenURL(lastCommit.url, function(shortUrl) { msg = 'push on ' + projectName + '@' + branchName + ' (by ' + user + '): ' +