File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def __init__(self, action):
16
16
def approve (cls , approver , commit ):
17
17
command = cls ('approve' )
18
18
command .commit = commit
19
- command .actor = approver
19
+ command .actor = approver . lstrip ( '@' )
20
20
return command
21
21
22
22
@classmethod
Original file line number Diff line number Diff line change @@ -68,6 +68,21 @@ def test_r_equals():
68
68
assert command .actor == 'jill'
69
69
70
70
71
+ def test_r_equals_at_user ():
72
+ """
73
+ @bors r=@jill
74
+ """
75
+
76
+ author = "jack"
77
+ body = "@bors r=@jill"
78
+ commands = parse_issue_comment (author , body , commit , "bors" )
79
+
80
+ assert len (commands ) == 1
81
+ command = commands [0 ]
82
+ assert command .action == 'approve'
83
+ assert command .actor == 'jill'
84
+
85
+
71
86
def test_hidden_r_equals ():
72
87
author = "bors"
73
88
body = """
You can’t perform that action at this time.
0 commit comments