From 21654f9928148668ae48cfc70c0ce28a56a11766 Mon Sep 17 00:00:00 2001 From: LukaszSielski Date: Thu, 19 Sep 2024 10:06:06 +0200 Subject: [PATCH] test (#18) * test * test --------- Co-authored-by: Lukasz Sielski --- scripts/gh_cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/gh_cli.py b/scripts/gh_cli.py index bfe78c3..d10f6f4 100644 --- a/scripts/gh_cli.py +++ b/scripts/gh_cli.py @@ -11,9 +11,11 @@ def extract_data_from_pr_body(self, commit_sha: str, pattern: re.Pattern) -> lis except subprocess.CalledProcessError as e: raise Exception(f'Failed to retrieve PR body! {e.stderr}') prDetailsJson = json.loads(prDetails) + print(prDetailsJson) if len(prDetailsJson) == 0: return '' - a = list(map(lambda e: e.split('#')[1], prDetailsJson[0]['body'])) + finds = re.findall(pattern, prDetailsJson[0]['body']) + a = list(map(lambda e: e.split('#')[1], finds)) print(a) return a