From c7dfa351cd663ab8ddd503a70a3f0cf936dc1216 Mon Sep 17 00:00:00 2001 From: Matt C Date: Mon, 3 Oct 2022 16:06:50 -0400 Subject: [PATCH] Update to avoid dupe comments Signed-off-by: Matt C --- bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index d4c3b97..97d43d9 100644 --- a/bot.py +++ b/bot.py @@ -43,8 +43,9 @@ for tgt in targets: print(f"Total votes against resolution: {str(total_votes_against)}") if (total_votes_for/len(core_team_logins)) > 0.5: print("This RFC should be passed. Adding comment.") - issue.create_comment("This resolution has enough votes from Core Team mebers to be considered passed. Please close the issue once appropriate actions have been taken. - Beep Boop (I'm a bot, and this action was performed automagically)") - issue.lock("resolved") + if not issue.locked: + issue.create_comment("This resolution has enough votes from Core Team mebers to be considered passed. Please close the issue once appropriate actions have been taken. - Beep Boop (I'm a bot, and this action was performed automagically)") + issue.lock("resolved") rfcs_passed += 1 status_text += f"* Suggested that {issue.title} be acted upon, as it has passed.\n" else: