Skip to content

Commit

Permalink
test (#18)
Browse files Browse the repository at this point in the history
* test

* test

---------

Co-authored-by: Lukasz Sielski <[email protected]>
  • Loading branch information
LukaszSielski and lsielskiSii authored Sep 19, 2024
1 parent 25f3ba5 commit 21654f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/gh_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 21654f9

Please sign in to comment.