UNPKG

conventional-changelog-conventionalcommits

Version:
12 lines (10 loc) 307 B
export function matchScope(config = {}, commit) { const { scope: targetScope, scopeOnly = false } = config const includesScope = commit.scope?.split(',').includes(targetScope) return !targetScope || (scopeOnly && includesScope) || (!scopeOnly && (!commit.scope || includesScope)) }