-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathanalyze-commits.js
More file actions
21 lines (16 loc) · 652 Bytes
/
Copy pathanalyze-commits.js
File metadata and controls
21 lines (16 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 = new ReleaseNotes(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
}