From f5725457bec3f105152a41865dab47ad1c3a63ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Scha=CC=88fer?= <101886095+PeterSchafer@users.noreply.github.com> Date: Tue, 16 Apr 2024 19:10:55 +0200 Subject: [PATCH] chore: extend commit pattern to allow more complex scope --- dangerfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dangerfile.js b/dangerfile.js index acca800f56..a9208f89b4 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -4,7 +4,7 @@ const fs = require('fs'); const MAX_COMMIT_MESSAGE_LENGTH = 72; function checkCommitMessage(commitMessage, url) { - const firstLineRegex = /^(feat|fix|chore|test|docs|refactor|revert)(\([a-z0-9]+\))?:(.+)$/; + const firstLineRegex = /^(feat|fix|chore|test|docs|refactor|revert)(\([a-z0-9-_]+\))?:(.+)$/; if (!firstLineRegex.test(commitMessage)) { fail( `"[${commitMessage}](${url})" is not using a valid commit message format. For commit guidelines, see: [CONTRIBUTING](https://github.com/snyk/snyk/blob/main/CONTRIBUTING.md#creating-commits).`,