Broaden commit type pattern
ci/woodpecker/push/gradle Pipeline was successful Details
ci/woodpecker/push/pages Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2023-07-16 14:50:06 +02:00
parent d4d5a0f42d
commit 8765d69f00
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 1 additions and 1 deletions

View File

@ -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)