Skip to content

Commit

Permalink
Make @ optional in "r? username" comments
Browse files Browse the repository at this point in the history
This allows PR descriptions to include instructions like "r? mbrubeck" without sending extraneous email when the PR is merged to other repos.
  • Loading branch information
mbrubeck committed Aug 29, 2017
1 parent 10a63c1 commit 3ae66d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/assign_reviewer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def find_reviewer(comment):
If the user specified a reviewer, return the username,
otherwise returns None.
"""
reviewer = re.search(r'.*r\?[:\- ]*@([a-zA-Z0-9\-]*)', str(comment))
reviewer = re.search(r'.*r\?[:\- ]*@?([a-zA-Z0-9\-]+)', str(comment))
if reviewer:
return reviewer.group(1)
return None
Expand Down

0 comments on commit 3ae66d8

Please sign in to comment.