[Owner] [p]version: Replace git@ URLs with https:// (#627)

Fixes #626
This commit is contained in:
Caleb Johnson 2017-02-20 15:14:38 -06:00 committed by Twentysix
parent 73ef66e8f8
commit 036c94a091

View File

@ -859,6 +859,9 @@ class Owner:
url, ncommits, branch, commits = result.split("\n", 3) url, ncommits, branch, commits = result.split("\n", 3)
if url.endswith(".git"): if url.endswith(".git"):
url = url[:-4] url = url[:-4]
if url.startswith("git@"):
domain, _, resource = url[4:].partition(':')
url = 'https://{}/{}'.format(domain, resource)
repo_name = url.split("/")[-1] repo_name = url.split("/")[-1]
embed = discord.Embed(title="Updates of " + repo_name, embed = discord.Embed(title="Updates of " + repo_name,