@@ -5,9 +5,12 @@ const la = require('lazy-ass')
55const is = require ( 'check-more-types' )
66
77// common git commands for getting basic info
8+ // https://git-scm.com/docs/git-show
89const gitCommands = {
910 branch : 'git rev-parse --abbrev-ref HEAD' ,
1011 message : 'git show -s --pretty=%B' ,
12+ subject : 'git show -s --pretty=%s' ,
13+ body : 'git show -s --pretty=%b' ,
1114 email : 'git show -s --pretty=%ae' ,
1215 author : 'git show -s --pretty=%an' ,
1316 sha : 'git show -s --pretty=%H' ,
@@ -53,6 +56,10 @@ function getGitBranch (pathToRepo) {
5356
5457const getMessage = runGitCommand . bind ( null , gitCommands . message )
5558
59+ const getSubject = runGitCommand . bind ( null , gitCommands . subject )
60+
61+ const getBody = runGitCommand . bind ( null , gitCommands . body )
62+
5663const getEmail = runGitCommand . bind ( null , gitCommands . email )
5764
5865const getAuthor = runGitCommand . bind ( null , gitCommands . author )
@@ -64,6 +71,8 @@ const getRemoteOrigin = runGitCommand.bind(null, gitCommands.remoteOriginUrl)
6471module . exports = {
6572 runGitCommand,
6673 getGitBranch,
74+ getSubject,
75+ getBody,
6776 getMessage,
6877 getEmail,
6978 getAuthor,
0 commit comments