From d341514e70b45113c74415f2db0b17c9bbd66895 Mon Sep 17 00:00:00 2001 From: codycooperross <50597551+codycooperross@users.noreply.github.com> Date: Tue, 30 Jul 2024 08:52:04 -0400 Subject: [PATCH] Change to regex --- .github/scripts/update_issue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/update_issue.py b/.github/scripts/update_issue.py index 06888cc..fb42daf 100644 --- a/.github/scripts/update_issue.py +++ b/.github/scripts/update_issue.py @@ -92,8 +92,8 @@ def get_matching_labels(discussion_body): row_type = row.get("type") match row_type: case "check": - text_to_match = "- [X] " + row.get("text") - if text_to_match in discussion_body: + regex = r"- \[[x|X]\]\s.*" + row.get("text") + if re.search(regex, discussion_body): matching_labels.append(row.get("label")) return matching_labels