summaryrefslogtreecommitdiffstats
path: root/etc/tool/copilot.py
diff options
context:
space:
mode:
Diffstat (limited to 'etc/tool/copilot.py')
-rw-r--r--etc/tool/copilot.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/tool/copilot.py b/etc/tool/copilot.py
index def3599e..348b8bb8 100644
--- a/etc/tool/copilot.py
+++ b/etc/tool/copilot.py
@@ -217,7 +217,7 @@ def main():
if not pull:
print(f"No PR number found")
exit()
- if pull.get_reviews().totalCount > 0 or pull.get_comments().totalCount > 0:
+ if pull.get_reviews().totalCount > 0 or pull.get_issue_comments().totalCount > 0:
print(f"Has already a review")
exit()
diff = get_diff(pull.diff_url)
@@ -239,7 +239,7 @@ def main():
if comments:
pull.create_review(body=review, comments=comments)
else:
- pull.create_comment(body=review)
+ pull.create_issue_comment(body=review)
except Exception as e:
print(f"Error posting review: {e}")
exit(1)