From 8765d69f001260ef402175b872e7528547bfb0e2 Mon Sep 17 00:00:00 2001 From: JFronny Date: Sun, 16 Jul 2023 14:50:06 +0200 Subject: [PATCH] Broaden commit type pattern --- .../src/main/kotlin/io/gitlab/jfronny/scripts/CommitType.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convention/src/main/kotlin/io/gitlab/jfronny/scripts/CommitType.kt b/convention/src/main/kotlin/io/gitlab/jfronny/scripts/CommitType.kt index 8b8229d..1bafa8d 100644 --- a/convention/src/main/kotlin/io/gitlab/jfronny/scripts/CommitType.kt +++ b/convention/src/main/kotlin/io/gitlab/jfronny/scripts/CommitType.kt @@ -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)