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):
1616 def approve (cls , approver , commit ):
1717 command = cls ('approve' )
1818 command .commit = commit
19- command .actor = approver
19+ command .actor = approver . lstrip ( '@' )
2020 return command
2121
2222 @classmethod
Original file line number Diff line number Diff line change @@ -68,6 +68,21 @@ def test_r_equals():
6868 assert command .actor == 'jill'
6969
7070
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+
7186def test_hidden_r_equals ():
7287 author = "bors"
7388 body = """
You can’t perform that action at this time.
0 commit comments