diff --git a/scripts/gh_cli.py b/scripts/gh_cli.py index 93aefe5..4367836 100644 --- a/scripts/gh_cli.py +++ b/scripts/gh_cli.py @@ -12,7 +12,7 @@ def extract_pr_body(self, commit_sha: str) -> str: raise Exception(f'Failed to retrieve PR body! {e.stderr}') prDetailsJson = json.loads(prDetails, strict=False) print(prDetailsJson) - return prDetailsJson[0]['body'] if len(prDetailsJson) == 0 else '' + return prDetailsJson[0]['body'] if len(prDetailsJson) != 0 else '' def extract_data_from_pr_body(self, commit_sha: str, pattern: re.Pattern) -> list[str]: print(self.extract_pr_body(commit_sha))