Skip to content

Commit b20ede1

Browse files
committed
fix(message): pass message
1 parent 218b6f6 commit b20ede1

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ emptyGitHubCommit({
5555
Uses [http://mikedeboer.github.io/node-github](http://mikedeboer.github.io/node-github)
5656
to make API calls.
5757

58+
### Testing
59+
60+
To test this project I created dummy repo
61+
[test-make-empty-github-commit](https://github.com/bahmutov/test-make-empty-github-commit).
62+
See its [commit history](https://github.com/bahmutov/test-make-empty-github-commit/commits/master)
63+
to see empty commit messages created from this repository using
64+
tests in [test](test) folder.
65+
5866
### Debugging
5967

6068
Run the tool with environment variable `DEBUG=make-empty-github-commit`

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ function emptyGitHubCommit (opts) {
106106
data.fullyQualifiedRef = opts.fullyQualifiedRef || 'heads/master'
107107
data.forceUpdate = opts.forceUpdate || false
108108
data.commitMessage =
109-
opts.commitMessage || 'AutoCommit - ' + new Date().getTime().toString()
109+
opts.message ||
110+
opts.commitMessage ||
111+
'AutoCommit - ' + new Date().getTime().toString()
110112

111113
return new Promise((resolve, reject) => {
112114
getReferenceCommit(data)

0 commit comments

Comments
 (0)