Broaden commit type pattern
This commit is contained in:
parent
d4d5a0f42d
commit
8765d69f00
|
@ -4,7 +4,7 @@ enum class CommitType {
|
|||
FIX, FEAT, BREAKING;
|
||||
|
||||
companion object {
|
||||
private val pattern: Regex = Regex("([a-zA-Z ]+)(?:\\([a-z]+\\))?(!)?: .+", RegexOption.DOT_MATCHES_ALL)
|
||||
private val pattern: Regex = Regex("([a-zA-Z ]+)(?:\\([a-zA-Z0-9 -]+\\))?(!)?: .+", RegexOption.DOT_MATCHES_ALL)
|
||||
|
||||
fun from(commitMessage: String, warn: (String) -> Unit): CommitType {
|
||||
val match = pattern.matchEntire(commitMessage)
|
||||
|
|
Loading…
Reference in New Issue