Skip to content

Commit 245a01e

Browse files
authored
Strip "@" from "r=@username_foobar"
1 parent 406c7a5 commit 245a01e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

homu/parse_issue_comment.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
from itertools import chain
22
import re
33

4+
def strip_at_prefix(input):
5+
if input.startswith("@"):
6+
return input[1:]
7+
return input
48

59
class IssueCommentCommand:
610
"""
@@ -16,7 +20,7 @@ def __init__(self, action):
1620
def approve(cls, approver, commit):
1721
command = cls('approve')
1822
command.commit = commit
19-
command.actor = approver
23+
command.actor = strip_at_prefix(approver)
2024
return command
2125

2226
@classmethod

0 commit comments

Comments
 (0)