chore(lib): move inside src folder

This commit is contained in:
Stephan Bönnemann
2015-06-11 12:36:50 -07:00
parent 40b48e375d
commit 825c0e66dd
8 changed files with 7 additions and 7 deletions
+32
View File
@@ -0,0 +1,32 @@
'use strict'
var parseRawCommit = require('conventional-changelog/lib/git').parseRawCommit
module.exports = function (commits) {
var type = null
commits
.map(function (commit) {
return parseRawCommit(commit.hash + '\n' + commit.message)
})
.filter(function (commit) {
return !!commit
})
.every(function (commit) {
if (commit.breaks.length) {
type = 'major'
return false
}
if (commit.type === 'feat') type = 'minor'
if (!type && commit.type === 'fix') type = 'patch'
return true
})
return type
}