Skip to content

Commit c70da58

Browse files
authored
Fix regex to cover '1 commit result' case
Current regex doesn't cover '1 commit result' case, that means if we get only 1 commit result, the dependent number will be set to 0. This patch try to fix it by use '* commit result' to match 'n commit results' and '1 commit result' case.
1 parent 26034df commit c70da58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

criticality_score/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@
4545
FAIL_RETRIES = 7
4646

4747
# Regex to match dependents count.
48-
DEPENDENTS_REGEX = re.compile(b'.*[^0-9,]([0-9,]+).*commit results', re.DOTALL)
48+
DEPENDENTS_REGEX = re.compile(b'.*[^0-9,]([0-9,]+).*commit result', re.DOTALL)

0 commit comments

Comments
 (0)