Skip to content

Commit 56244c4

Browse files
authored
Merge pull request #54 from bryanburgers/test-bors-prefix
Add test to ensure @bors only responds to itself
2 parents abd0083 + 0499511 commit 56244c4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

homu/tests/test_parse_issue_comment.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,20 @@ def test_multiple_hooks():
497497
assert thirdhook_commands[0].hook_extra is None
498498

499499

500+
def test_similar_name():
501+
"""
502+
Test that a username that starts with 'bors' doesn't trigger.
503+
"""
504+
505+
author = "jack"
506+
body = """
507+
@bors-servo r+
508+
"""
509+
commands = parse_issue_comment(author, body, commit, "bors")
510+
511+
assert len(commands) == 0
512+
513+
500514
def test_parse_up_to_first_unknown_word():
501515
"""
502516
Test that when parsing, once we arrive at an unknown word, we stop parsing

0 commit comments

Comments
 (0)