Skip to content

Commit c8f51b8

Browse files
authored
Merge pull request #188 from Nilstrieb/remove-more-forbidden-knowledge
Prevent `@bors try-` from being used
2 parents 3abf0b0 + 567e557 commit c8f51b8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

homu/parse_issue_comment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ def parse_issue_comment(username, body, sha, botname, hooks=[]):
229229
commands.append(IssueCommentCommand.try_())
230230

231231
elif word == 'try-':
232-
commands.append(IssueCommentCommand.untry())
232+
# Try- is broken, prevent its usage.
233+
# commands.append(IssueCommentCommand.untry())
234+
pass
233235

234236
elif word in WORDS_TO_ROLLUP:
235237
rollup_value = WORDS_TO_ROLLUP[word]

homu/tests/test_parse_issue_comment.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,7 @@ def test_try_minus():
280280
body = "@bors try-"
281281
commands = parse_issue_comment(author, body, commit, "bors")
282282

283-
assert len(commands) == 1
284-
command = commands[0]
285-
assert command.action == 'untry'
283+
assert len(commands) == 0
286284

287285

288286
def test_rollup():

0 commit comments

Comments
 (0)