diff --git a/lib/workers/repository/updates/semantic.js b/lib/workers/repository/updates/semantic.js index bc00d9a934d22ad7821942956e79f4829842f9f2..286cd2073b1371f4329b971a4febc5afce8fbc3d 100644 --- a/lib/workers/repository/updates/semantic.js +++ b/lib/workers/repository/updates/semantic.js @@ -5,16 +5,18 @@ async function detectSemanticCommits(config) { return config.semanticCommits; } const commitMessages = await platform.getCommitMessages(); + if (commitMessages) { + commitMessages.length = 10; + } logger.trace(`commitMessages=${JSON.stringify(commitMessages)}`); const type = conventionalCommitsDetector(commitMessages); - if (type === 'unknown') { - logger.debug('No semantic commit type found'); - return false; + logger.debug({ type }, 'Semantic commits detection'); + if (type === 'angular') { + logger.info('angular semantic commits detected'); + return true; } - logger.debug( - `Found semantic commit type ${type} - enabling semantic commits` - ); - return true; + logger.info('No semantic commits detected'); + return false; } module.exports = {