UNPKG

semantic-release-gitmoji

Version:

Different from conventional changelog, Gitmoji commits are used to determine a release type and generate release notes.

22 lines (16 loc) 652 B
const debug = require('./helper/debug') const getConfig = require('./helper/get-config') const ReleaseNotes = require('./release-notes') module.exports = function analyzeCommits (pluginConfig, context) { const { logger } = context const config = getConfig(pluginConfig, context) debug('[Analyze commits] Effective config: %o', config) const notes = ReleaseNotes.get(context, config.releaseNotes) const releaseType = notes.getReleaseType(config.releaseRules) if (releaseType) { logger.log('The next release will be a "%s" release.', releaseType) } else { logger.log('There will be no new version.') } return releaseType }