Skip to content

Commit

Permalink
Allow multiple scopes with surrounding spaces
Browse files Browse the repository at this point in the history
Co-authored-by: Zeke Sikelianos <zeke@github.com>
  • Loading branch information
pablosichert and zeke authored Jan 22, 2021
1 parent 2d219a4 commit ffb2813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/is-semantic-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit ffb2813

Please sign in to comment.