build: make git revert messages valid (#22339)
`git revert` default message is "Revert <original message>" (no semi-colon) PR Close #22339
This commit is contained in:
@ -22,7 +22,7 @@ const configPath = path.resolve(__dirname, './commit-message.json');
|
||||
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
||||
const PATTERN = /^(\w+)(?:\(([^)]+)\))?\: (.+)$/;
|
||||
const FIXUP_SQUASH = /^(fixup|squash)\! /i;
|
||||
const REVERT = /^revert: (\"(.*)\"|(.*))?$/i;
|
||||
const REVERT = /^revert:? (\"(.*)\"|(.*))?$/i;
|
||||
|
||||
module.exports = function(commitSubject) {
|
||||
commitSubject = commitSubject.replace(FIXUP_SQUASH, '');
|
||||
|
Reference in New Issue
Block a user