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:
Victor Berchet
2018-02-20 17:11:10 -08:00
parent ee535777bb
commit 484802cd2a
2 changed files with 2 additions and 2 deletions

View File

@ -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, '');