Skip to content

Commit

Permalink
fix(danger): commit pattern in danger to disable certain characters (#…
Browse files Browse the repository at this point in the history
…5089)

Update dangerfile.js

Co-authored-by: Casey Marshall <[email protected]>
  • Loading branch information
PeterSchafer and cmars authored Mar 4, 2024
1 parent 00af20b commit 2113022
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 @@ -9,7 +9,7 @@ if (danger.github && danger.github.pr) {
const { message, url } = commit;
const [firstLine] = message.split('\n', 1);

const firstLineRegex = /^(feat|fix|chore|test|docs|refactor|revert)(\(.*\))?:(.+)$/;
const firstLineRegex = /^(feat|fix|chore|test|docs|refactor|revert)(\([a-z0-9]+\))?:(.+)$/;
if (!firstLineRegex.test(firstLine)) {
fail(
`"[${firstLine}](${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 2113022

Please sign in to comment.