From 365c05be3dacfa14b77700f0b83565a7e3ee6b69 Mon Sep 17 00:00:00 2001 From: Dheeraj Khushalani Date: Fri, 22 Dec 2017 12:11:33 +1100 Subject: [PATCH] Added last commit message Added a new function to get last commit message. --- index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.js b/index.js index 6e4dd9a..de98048 100755 --- a/index.js +++ b/index.js @@ -35,4 +35,13 @@ module.exports = { }) } + , lastCommitMessage: function(cb) { + _command('git log -1 --pretty=%B', function(str) { + if(str) { + cb(str) + } else { + cb(undefined) + } + }) + } }