Skip to content

Commit 3b69b61

Browse files
committed
Build: Make commit validation work with PRs
Fix #375
1 parent efeed70 commit 3b69b61

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scripts/check-commit-message.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,15 @@ const isExcludedCommit = (commit) => {
163163

164164
// Releases are special cases, so they don't need to be checked.
165165

166-
if (/^v\d+\.\d+\.\d+/i.test(commit.message[0])) {
166+
if (/^v\d+\.\d+\.\d+/i.test(commit.message)) {
167+
return true;
168+
}
169+
170+
// Pull requests will contain a commit with the message:
171+
//
172+
// Merge <sha> into <sha>
173+
174+
if (/^Merge\s[a-zA-Z0-9]{40}\sinto\s[a-zA-Z0-9]{40}/i.test(commit.message)) {
167175
return true;
168176
}
169177

0 commit comments

Comments
 (0)