Skip to content

Commit

Permalink
ci: fix scope check for same level scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
mgouicem committed Dec 18, 2024
1 parent 4cda578 commit 9904f89
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/automation/commit-msg-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import argparse
import subprocess
import re

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

for scopes in scopesArray:
numWords = len(scopes.split())
numWords = len(re.split(',| ', scopes))
numCommas = scopes.count(",")

if numWords != numCommas + 1:
Expand Down

0 comments on commit 9904f89

Please sign in to comment.