Skip to content

Commit

Permalink
chore: extend commit pattern to allow more complex scope
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSchafer committed Apr 17, 2024
1 parent 5400c69 commit f572545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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).`,
Expand Down

0 comments on commit f572545

Please sign in to comment.