File tree 2 files changed +16
-1
lines changed 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def delegate_author(cls):
45
45
@classmethod
46
46
def delegate (cls , delegate_to ):
47
47
command = cls ('delegate' )
48
- command .delegate_to = delegate_to
48
+ command .delegate_to = delegate_to . lstrip ( '@' )
49
49
return command
50
50
51
51
@classmethod
Original file line number Diff line number Diff line change @@ -213,6 +213,21 @@ def test_delegate_equals():
213
213
assert command .delegate_to == 'jill'
214
214
215
215
216
+ def test_delegate_equals_at_user ():
217
+ """
218
+ @bors delegate=@{username}
219
+ """
220
+
221
+ author = "jack"
222
+ body = "@bors delegate=@jill"
223
+ commands = parse_issue_comment (author , body , commit , "bors" )
224
+
225
+ assert len (commands ) == 1
226
+ command = commands [0 ]
227
+ assert command .action == 'delegate'
228
+ assert command .delegate_to == 'jill'
229
+
230
+
216
231
def test_delegate_minus ():
217
232
"""
218
233
@bors delegate-
You can’t perform that action at this time.
0 commit comments