Skip to content

Commit 59d007f

Browse files
author
Romain Gagnaire
committed
[ADD] (git) Added ability to override commit description
1 parent 25105bb commit 59d007f

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ node_modules
77
npm-debug.log
88

99
# Editor files
10+
/.idea
11+
/.history
1012
/.project
1113
/.settings
12-
/.idea
1314
/.vscode
1415

1516
# coverage

lib/lifecycles/commit.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const { CHANGELOG: { COMMIT_DESCRIPTION = '[ci skip]' } = {}} = require('config');
2+
13
const bump = require('../lifecycles/bump')
24
const checkpoint = require('../checkpoint')
35
const formatCommitMessage = require('../format-commit-message')
@@ -33,7 +35,13 @@ function execCommit (args, newVersion) {
3335
})
3436
checkpoint(args, msg, paths)
3537
return runExec(args, 'git add' + toAdd + ' ' + args.infile)
36-
.then(() => {
37-
return runExec(args, 'git commit ' + verify + (args.sign ? '-S ' : '') + (args.commitAll ? '' : (args.infile + toAdd)) + ' -m "' + formatCommitMessage(args.message, newVersion) + '" -m "[ci skip]"')
38-
})
38+
.then(() => {
39+
var commitCommand = 'git commit ' + verify + (args.sign ? '-S ' : '') + (args.commitAll ? '' : (args.infile + toAdd)) + ' -m "' + formatCommitMessage(args.message, newVersion) + '"';
40+
41+
if (COMMIT_DESCRIPTION) {
42+
commitCommand += ' -m "' + COMMIT_DESCRIPTION + '"';
43+
}
44+
45+
return runExec(args, commitCommand)
46+
})
3947
}

0 commit comments

Comments
 (0)