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.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/tool/copilot.py b/etc/tool/copilot.py
index ed1fdf16..817d92da 100644
--- a/etc/tool/copilot.py
+++ b/etc/tool/copilot.py
@@ -219,9 +219,6 @@ def main():
if not pull:
print(f"No PR number found")
exit()
- 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)
except Exception as e:
print(f"Error get details: {e.__class__.__name__}: {e}")
@@ -231,6 +228,9 @@ def main():
except Exception as e:
print(f"Error create review: {e}")
exit(1)
+ if pull.get_reviews().totalCount > 0 or pull.get_issue_comments().totalCount > 0:
+ pull.create_issue_comment(body=review)
+ return
try:
comments = analyze_code(pull, diff)
except Exception as e: