Skip to content
This repository was archived by the owner on Nov 26, 2018. It is now read-only.

Commit 82be820

Browse files
committed
Merge pull request #22 from huonw/patch-1
Minimise github greediness with \b RE specifier
2 parents 9c9c5f5 + 7f4c496 commit 82be820

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

botbot_plugins/plugins/github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Plugin(BasePlugin):
3030
url = "https://api.github.com/repos"
3131
config_class = Config
3232

33-
@listens_to_all(ur'(?:.*)(?:GH|gh):(?P<repo>[\w\-\_]+)#?(?P<issues>\d+(?:,\d+)*)(?:.*)')
33+
@listens_to_all(ur'(?:.*)\b(?:GH|gh):(?P<repo>[\w\-\_]+)#?(?P<issues>\d+(?:,\d+)*)\b(?:.*)')
3434
def issue_lookup(self, line, repo, issues):
3535
"""Lookup an specified repo issue"""
3636
# issues can be a list of issue separated by a comma
@@ -51,7 +51,7 @@ def issue_lookup(self, line, repo, issues):
5151
return ", ".join(response_list)
5252

5353

54-
@listens_to_all(ur'(?:.*)(?:GH|gh)#?(?P<issues>\d+(?:,\d+)*)(?:.*)')
54+
@listens_to_all(ur'(?:.*)\b(?:GH|gh)#?(?P<issues>\d+(?:,\d+)*)\b(?:.*)')
5555
def project_issue_lookup(self, line, issues):
5656
"""Lookup an issue for the default repo"""
5757
if not (self.config['organization'] and self.config['repo']):

0 commit comments

Comments
 (0)