diff --git a/lib/is-semantic-message.js b/lib/is-semantic-message.js index b6a18dd..1292a85 100644 --- a/lib/is-semantic-message.js +++ b/lib/is-semantic-message.js @@ -17,6 +17,6 @@ module.exports = function isSemanticMessage (message, validScopes, validTypes, a const [result] = commits const { scope: scopes, type } = result.header - const isScopeValid = !validScopes || !scopes || scopes.split(',').every(scope => validScopes.includes(scope)) + const isScopeValid = !validScopes || !scopes || scopes.split(',').map(trim).every(scope => validScopes.includes(scope)) return (validTypes || commitTypes).includes(type) && isScopeValid }