Skip to content

Commit b2c0f51

Browse files
committed
Adds regex to include new template where USD is specified
1 parent e6aead0 commit b2c0f51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/sdg_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ def parse_issue(issue):
6060
if url := re.search(r"\[(.*)\]\(.*\)", project_name):
6161
project_name = url.group(1)
6262

63-
amount_match = re.search(r"(?i)Amount requested\s*[\n\r]+(.+?)(?=\n\S|$)", body, re.DOTALL)
63+
amount_match = re.search(r"(?i)Amount requested\s*(\(USD\))\s*[\n\r]+(.+?)(?=\n\S|$)", body, re.DOTALL)
6464
funded_amount = 0
6565
try:
66-
amount_requested = int(re.sub(r"[^\d]", "", amount_match.group(1)))
66+
amount_requested = int(re.sub(r"[^\d]", "", amount_match.group(2)))
6767
except ValueError:
6868
amount_requested = 0
6969
if "funded" in [l.lower() for l in labels] and amount_match:

0 commit comments

Comments
 (0)