From 567e55731f1a3481eb860a8f8db6743e9035f3bb Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Wed, 14 Dec 2022 20:04:03 +0100 Subject: [PATCH] Prevent `@bors try-` from being used `try-` breaks the PR in weird ways that we would rather not see. --- homu/parse_issue_comment.py | 4 +++- homu/tests/test_parse_issue_comment.py | 4 +--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homu/parse_issue_comment.py b/homu/parse_issue_comment.py index 6a65bd2..27be202 100644 --- a/homu/parse_issue_comment.py +++ b/homu/parse_issue_comment.py @@ -229,7 +229,9 @@ def parse_issue_comment(username, body, sha, botname, hooks=[]): commands.append(IssueCommentCommand.try_()) elif word == 'try-': - commands.append(IssueCommentCommand.untry()) + # Try- is broken, prevent its usage. + # commands.append(IssueCommentCommand.untry()) + pass elif word in WORDS_TO_ROLLUP: rollup_value = WORDS_TO_ROLLUP[word] diff --git a/homu/tests/test_parse_issue_comment.py b/homu/tests/test_parse_issue_comment.py index f9fc2ad..33ac166 100644 --- a/homu/tests/test_parse_issue_comment.py +++ b/homu/tests/test_parse_issue_comment.py @@ -280,9 +280,7 @@ def test_try_minus(): body = "@bors try-" commands = parse_issue_comment(author, body, commit, "bors") - assert len(commands) == 1 - command = commands[0] - assert command.action == 'untry' + assert len(commands) == 0 def test_rollup():