Skip to content

Commit

Permalink
commitlint.config: fix the regex pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
tehraninasab committed Nov 17, 2022
1 parent 73e476f commit 1b6d4ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commitlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ module.exports = {
if (body !== null) {
let bodyStr = convertAnyToString(body, "body").trim();
let lines = bodyStr.split('\n');
offence = lines[0].match('This reverts commit ') !== null && lines.length == 1;
offence = lines[0].match(/^This reverts commit [^ ]{40}$/) !== null && lines.length == 1;
}
else {
offence = true;
Expand Down

0 comments on commit 1b6d4ca

Please sign in to comment.