Skip to content

Commit 9904f89

Browse files
committed
ci: fix scope check for same level scopes
1 parent 4cda578 commit 9904f89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/automation/commit-msg-check.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
import argparse
2222
import subprocess
23+
import re
2324

2425
# * Ensuring the scopes end in colon and same level scopes are comma delimited.
2526
# TODO: Limit scopes to an acceptable list of tags.
@@ -36,7 +37,7 @@ def __scopeCheck(msg: str):
3637
scopesArray = firstLine.split(":")[:-1]
3738

3839
for scopes in scopesArray:
39-
numWords = len(scopes.split())
40+
numWords = len(re.split(',| ', scopes))
4041
numCommas = scopes.count(",")
4142

4243
if numWords != numCommas + 1:

0 commit comments

Comments
 (0)