File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 1- const { isMatchWith, isRegExp, omit } = require ( 'lodash' ) ;
1+ const { isMatchWith, isRegExp} = require ( 'lodash' ) ;
22const debug = require ( 'debug' ) ( 'semantic-release:commit-analyzer' ) ;
33const RELEASE_TYPES = require ( './default-release-types' ) ;
44const compareReleaseTypes = require ( './compare-release-types' ) ;
@@ -15,11 +15,13 @@ module.exports = (releaseRules, commit) => {
1515
1616 releaseRules
1717 . filter (
18- rule =>
19- ( ! rule . breaking || ( commit . notes && commit . notes . length > 0 ) ) &&
18+ ( { breaking, release, ...rule } ) =>
19+ // If the rule is not `breaking` or the commit doesn't have a breaking change note
20+ ( ! breaking || ( commit . notes && commit . notes . length > 0 ) ) &&
21+ // Otherwise match the regular rules
2022 isMatchWith (
2123 commit ,
22- omit ( rule , [ 'release' , 'breaking' ] ) ,
24+ rule ,
2325 ( obj , src ) =>
2426 / ^ \/ .* \/ $ / . test ( src ) || isRegExp ( src ) ? new RegExp ( / ^ \/ ( .* ) \/ $ / . exec ( src ) [ 1 ] ) . test ( obj ) : undefined
2527 )
You can’t perform that action at this time.
0 commit comments