From e377b7dca1ecf8396a825e1dd62a52fc01607cc4 Mon Sep 17 00:00:00 2001 From: Stan Kwong Date: Mon, 2 Dec 2019 13:39:22 -0800 Subject: [PATCH] fix: fix commit validation logging Uses the correct function signature for commitlint#format --- src/lint-commits.plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lint-commits.plugin.js b/src/lint-commits.plugin.js index a9b4713..ea32cfe 100644 --- a/src/lint-commits.plugin.js +++ b/src/lint-commits.plugin.js @@ -35,8 +35,8 @@ async function validateCommit(commitMeta, opts, logger) { const detail = commitMeta.commit.short ? ` ${commitMeta.commit.short}` : ''; logger.error(`😞 Errors found with commit${detail}`); logger.error(`💬 ${commitMeta.message}`); - const formatted = format({ errors: report.errors }); - formatted.forEach((item) => logger.log(item)); + const formatted = format({ results: [report] }); + logger.log(formatted); throw new SemanticReleaseError( `The commit message is not formatted correctly`, 'EINVALIDCOMMIT'