Created
April 14, 2021 22:25
-
-
Save G00fY2/c8daab6115c07d78d8851565bf703375 to your computer and use it in GitHub Desktop.
kotlin conventional commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val conventionalCommitRegex = Regex("^((build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test)(\\(\\w+\\))?(!)?(: (.*\\s*)*))|(Merge (.*\\s*)*)|(Initial commit\$)") | |
val maxSubjectLineLength = 72 | |
val test = "fix(dagger): fix bad injection" | |
conventionalCommitRegex.matches(test) && test.lines().first().length <= maxSubjectLineLength | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment