diff options
author | 2021-04-13 15:54:03 +0200 | |
---|---|---|
committer | 2021-04-13 15:54:03 +0200 | |
commit | ccdf1c9efc273f2945baed90008ab3fdd73a53a1 (patch) | |
tree | 88aaa8309b022ff3d2877f930d1df07d572abf9a | |
parent | Merge 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.py | 3 |
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 |