aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar laundmo <[email protected]>2021-04-13 15:54:03 +0200
committerGravatar GitHub <[email protected]>2021-04-13 15:54:03 +0200
commitccdf1c9efc273f2945baed90008ab3fdd73a53a1 (patch)
tree88aaa8309b022ff3d2877f930d1df07d572abf9a
parentMerge pull request #674 from rijusougata13/main (diff)
Update issue matching regex
fixes it being unable to get issue numbers larger than 9 limits it somewhat length-wise and character-wise to the actual github limits
-rw-r--r--bot/exts/evergreen/issues.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/exts/evergreen/issues.py b/bot/exts/evergreen/issues.py
index bb6273bb..4dd10d13 100644
--- a/bot/exts/evergreen/issues.py
+++ b/bot/exts/evergreen/issues.py
@@ -51,7 +51,8 @@ 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