push
github
856 of 913 branches covered (93.76%)
108 of 280 new or added lines in 20 files covered. (38.57%)
4683 of 5110 relevant lines covered (91.64%)
64299.7 hits per line
|
export function whatBump (commits) { |
3✔ |
NEW
|
let level = 2
|
× |
NEW
|
let breakings = 0
|
× |
NEW
|
let features = 0
|
× |
NEW
|
|
× |
NEW
|
commits.forEach(commit => { |
× |
NEW
|
if (commit.notes.length > 0) { |
× |
NEW
|
breakings += commit.notes.length |
× |
NEW
|
level = 0
|
× |
NEW
|
} else if (commit.type === 'feat') { |
× |
NEW
|
features += 1
|
× |
NEW
|
if (level === 2) { |
× |
NEW
|
level = 1
|
× |
NEW
|
} |
× |
NEW
|
} |
× |
NEW
|
}) |
× |
NEW
|
|
× |
NEW
|
return {
|
× |
NEW
|
level, |
× |
NEW
|
reason: breakings === 1 |
× |
NEW
|
? `There is ${breakings} BREAKING CHANGE and ${features} features` |
× |
NEW
|
: `There are ${breakings} BREAKING CHANGES and ${features} features` |
× |
NEW
|
} |
× |
NEW
|
} |
× |