From 23560b24b69587618197a8748aa645d3a280a66a Mon Sep 17 00:00:00 2001 From: Arash Kadkhodaei Date: Tue, 11 Jun 2024 13:56:03 +0200 Subject: [PATCH] Fix empty comment error --- github_run.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/github_run.py b/github_run.py index 7ed77f7..eebc264 100644 --- a/github_run.py +++ b/github_run.py @@ -51,6 +51,8 @@ def comment(self, comment_text): f"https://api.github.com/repos/{self.repo}/issues/{self.pr_number}/comments" ) for comment_body in comment_text.split("\n\n---\n"): + if not comment_body: + continue data = {"body": str(comment_body)} response = requests.post(url, headers=headers, json=data) if response.status_code != 201: