Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion homu/parse_issue_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def delegate_author(cls):
@classmethod
def delegate(cls, delegate_to):
command = cls('delegate')
command.delegate_to = delegate_to
command.delegate_to = delegate_to.lstrip('@')
return command

@classmethod
Expand Down
15 changes: 15 additions & 0 deletions homu/tests/test_parse_issue_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,21 @@ def test_delegate_equals():
assert command.delegate_to == 'jill'


def test_delegate_equals_at_user():
"""
@bors delegate=@{username}
"""

author = "jack"
body = "@bors delegate=@jill"
commands = parse_issue_comment(author, body, commit, "bors")

assert len(commands) == 1
command = commands[0]
assert command.action == 'delegate'
assert command.delegate_to == 'jill'


def test_delegate_minus():
"""
@bors delegate-
Expand Down