Skip to content

Commit

Permalink
Fix empty comment error
Browse files Browse the repository at this point in the history
  • Loading branch information
arash77 authored Jun 11, 2024
1 parent 541bb90 commit 23560b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions github_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 23560b2

Please sign in to comment.