fix check
This commit is contained in:
parent
0e016e8ccb
commit
394c299ffe
9
index.js
9
index.js
|
@ -38,18 +38,15 @@ const pkg = getPackageJson();
|
||||||
|
|
||||||
const checkLAstCommitOnly = process.env['INPUT_CHECK-LAST-COMMIT-ONLY'] || 'false';
|
const checkLAstCommitOnly = process.env['INPUT_CHECK-LAST-COMMIT-ONLY'] || 'false';
|
||||||
|
|
||||||
|
let messages = []
|
||||||
if (checkLAstCommitOnly === 'true') {
|
if (checkLAstCommitOnly === 'true') {
|
||||||
console.log('Only checking the last commit...');
|
console.log('Only checking the last commit...');
|
||||||
const commit = event.commits ? event.commits[event.commits.length - 1] : null;
|
const commit = event.commits ? event.commits[event.commits.length - 1] : null;
|
||||||
const messages = commit ? [commit.message + '\n' + commit.body] : [];
|
messages = commit ? [commit.message + '\n' + commit.body] : [];
|
||||||
await run(messages, versionType, tagPrefix, tagSuffix, pkg);
|
|
||||||
} else {
|
} else {
|
||||||
const messages = event.commits ? event.commits.map((commit) => commit.message + '\n' + commit.body) : [];
|
messages = event.commits ? event.commits.map((commit) => commit.message + '\n' + commit.body) : [];
|
||||||
await run(messages, versionType, tagPrefix, tagSuffix, pkg);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const messages = event.commits ? event.commits.map((commit) => commit.message + '\n' + commit.body) : [];
|
|
||||||
|
|
||||||
const commitMessage = process.env['INPUT_COMMIT-MESSAGE'] || 'ci: version bump to {{version}}';
|
const commitMessage = process.env['INPUT_COMMIT-MESSAGE'] || 'ci: version bump to {{version}}';
|
||||||
console.log('commit messages:', messages);
|
console.log('commit messages:', messages);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue