File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
tests/unit/lib/scm-data-generators Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,10 @@ Committer's email
202
202
203
203
Committer's name
204
204
205
+ ##### message
206
+
207
+ The commit message
208
+
205
209
##### branch
206
210
207
211
Git branch being deployed
Original file line number Diff line number Diff line change @@ -12,7 +12,15 @@ module.exports = CoreObject.extend({
12
12
generate : function ( ) {
13
13
var _this = this ;
14
14
return new RSVP . Promise ( function ( resolve /*, reject */ ) {
15
- simpleGit ( _this . path ) . log ( function ( err , log ) {
15
+ simpleGit ( _this . path ) . log ( {
16
+ format : {
17
+ hash : '%H' ,
18
+ date : '%ai' ,
19
+ commit_message : '%s' ,
20
+ author_name : '%aN' ,
21
+ author_email : '%ae'
22
+ }
23
+ } , function ( err , log ) {
16
24
if ( ! log || ! log . latest ) {
17
25
resolve ( ) ;
18
26
} else {
@@ -22,6 +30,7 @@ module.exports = CoreObject.extend({
22
30
sha : info . hash . replace ( "'" , '' ) ,
23
31
email : info . author_email . replace ( "'" , '' ) ,
24
32
name : info . author_name ,
33
+ message : info . commit_message ,
25
34
timestamp : new Date ( info . date ) . toISOString ( ) ,
26
35
branch : gitRepoInfo ( ) . branch ,
27
36
tag : gitRepoInfo ( ) . tag
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ describe('the git scm data generator', function() {
30
30
assert . equal ( data . sha , '41d41f081b45ad50935c08b1203220737d9739b4' ) ;
31
31
assert . equal ( data . email , 'alisdair@mcdiarmid.org' ) ;
32
32
assert . equal ( data . name , 'Alisdair McDiarmid' ) ;
33
+ assert . equal ( data . message , 'Initial commit' )
33
34
assert . isNotNull ( data . timestamp ) ;
34
35
assert . equal ( data . branch , 'master' ) ;
35
36
assert . equal ( data . tag , '2.3.4' ) ;
You can’t perform that action at this time.
0 commit comments