Skip to content

Add test to ensure @bors only responds to itself #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions homu/tests/test_parse_issue_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,20 @@ def test_multiple_hooks():
assert thirdhook_commands[0].hook_extra is None


def test_similar_name():
"""
Test that a username that starts with 'bors' doesn't trigger.
"""

author = "jack"
body = """
@bors-servo r+
"""
commands = parse_issue_comment(author, body, commit, "bors")

assert len(commands) == 0


def test_parse_up_to_first_unknown_word():
"""
Test that when parsing, once we arrive at an unknown word, we stop parsing
Expand Down