aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2018-10-31 13:54:11 +0100
committerGravatar GitHub <[email protected]>2018-10-31 13:54:11 +0100
commitd431124c106fff653e4321a8b1f0c02315b85897 (patch)
treeb1a2281baf6ee5eac9bd0b6b30310f98a5f4ba28
parentMerge pull request #46 from sco1/hacktoberstats (diff)
parentFix hacktoberstats to properly parse valid repository names with _ and . (diff)
Merge pull request #59 from sco1/hacktoberstats-fix
Fix hacktoberstats to properly parse valid repository names with _ and .
-rw-r--r--bot/cogs/hacktoberstats.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/hacktoberstats.py b/bot/cogs/hacktoberstats.py
index adbc5c82..0ccb41c1 100644
--- a/bot/cogs/hacktoberstats.py
+++ b/bot/cogs/hacktoberstats.py
@@ -22,7 +22,7 @@ class Stats:
aliases=('hacktoberstats', 'getstats', 'userstats'),
invoke_without_command=True
)
- async def hacktoberstats_group(self, ctx: commands.Context, github_username: str=None):
+ async def hacktoberstats_group(self, ctx: commands.Context, github_username: str = None):
"""
If invoked without a subcommand or github_username, get the invoking user's stats if
they've linked their Discord name to GitHub using .stats link
@@ -47,7 +47,7 @@ class Stats:
await self.get_stats(ctx, github_username)
@hacktoberstats_group.command(name="link")
- async def link_user(self, ctx: commands.Context, github_username: str=None):
+ async def link_user(self, ctx: commands.Context, github_username: str = None):
"""
Link the invoking user's Github github_username to their Discord ID
@@ -264,7 +264,7 @@ class Stats:
V
"discord-python/hacktoberbot"
"""
- exp = r"https?:\/\/api.github.com\/repos\/([/\-\w]+)"
+ exp = r"https?:\/\/api.github.com\/repos\/([/\-\_\.\w]+)"
return re.findall(exp, in_url)[0]
@staticmethod