mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-09-11 03:55:31 +03:00
send-to-bot: remove once, let the tldr-bot always comment (#11547)
This commit is contained in:
parent
1b66ca8aee
commit
778555a1fb
@ -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"
|
||||
|
||||
if once:
|
||||
endpoint += "/once"
|
||||
|
||||
data = {"pr_id": pr_id, "body": body}
|
||||
|
||||
try:
|
||||
@ -62,12 +59,10 @@ def main(action):
|
||||
|
||||
if action == "report-errors":
|
||||
comment_body = COMMENT_ERROR.format(build_id=BUILD_ID, content=content)
|
||||
comment_once = False
|
||||
elif action == "report-check-results":
|
||||
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.")
|
||||
else:
|
||||
print("Error sending data to tldr-bot!", file=sys.stderr)
|
||||
|
Loading…
Reference in New Issue
Block a user