aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Xithrius <[email protected]>2021-04-13 20:05:54 -0700
committerGravatar GitHub <[email protected]>2021-04-13 20:05:54 -0700
commitd3a78d47a0d72efa402b4ca1cc250fa5e5198433 (patch)
treeb765b20e7157d7376233bfc3dc6f1735bc298b0f
parentchore: use discord terminology (diff)
parentMerge pull request #680 from python-discord/laundmo-regex-isssue-patch (diff)
Merge branch 'main' into vcokltfre/feat/ping
-rw-r--r--bot/exts/evergreen/issues.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bot/exts/evergreen/issues.py b/bot/exts/evergreen/issues.py
index bb6273bb..a0316080 100644
--- a/bot/exts/evergreen/issues.py
+++ b/bot/exts/evergreen/issues.py
@@ -51,7 +51,10 @@ CODE_BLOCK_RE = re.compile(
MAXIMUM_ISSUES = 5
# Regex used when looking for automatic linking in messages
-AUTOMATIC_REGEX = re.compile(r"((?P<org>.+?)\/)?(?P<repo>.+?)#(?P<number>.+?)")
+# regex101 of current regex https://regex101.com/r/V2ji8M/6
+AUTOMATIC_REGEX = re.compile(
+ r"((?P<org>[a-zA-Z0-9][a-zA-Z0-9\-]{1,39})\/)?(?P<repo>[\w\-\.]{1,100})#(?P<number>[0-9]+)"
+)
@dataclass