send-to-bot: remove once, let the tldr-bot always comment (#11547)

pull/23/head
Sebastiaan Speck 2023-11-20 21:06:02 +01:00 committed by GitHub
parent 1b66ca8aee
commit 778555a1fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 7 deletions

View File

@ -28,12 +28,9 @@ Is this intended? If so, just ignore this comment. Otherwise, please double-chec
################################################################################ ################################################################################
def post_comment(pr_id, body, once): def post_comment(pr_id, body):
endpoint = f"{BOT_URL}/comment" endpoint = f"{BOT_URL}/comment"
if once:
endpoint += "/once"
data = {"pr_id": pr_id, "body": body} data = {"pr_id": pr_id, "body": body}
try: try:
@ -62,12 +59,10 @@ def main(action):
if action == "report-errors": if action == "report-errors":
comment_body = COMMENT_ERROR.format(build_id=BUILD_ID, content=content) comment_body = COMMENT_ERROR.format(build_id=BUILD_ID, content=content)
comment_once = False
elif action == "report-check-results": elif action == "report-check-results":
comment_body = COMMENT_CHECK.format(content=content) comment_body = COMMENT_CHECK.format(content=content)
comment_once = True
if post_comment(PR_ID, comment_body, comment_once): if post_comment(PR_ID, comment_body):
print("Success.") print("Success.")
else: else:
print("Error sending data to tldr-bot!", file=sys.stderr) print("Error sending data to tldr-bot!", file=sys.stderr)