From 46c27036b8ed81f7900019c27b75fa242713bf3d Mon Sep 17 00:00:00 2001 From: tdurieux Date: Tue, 7 Sep 2021 07:13:08 +0200 Subject: [PATCH] feat: add support for .git url --- public/script/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/script/utils.js b/public/script/utils.js index ab87298..2be501e 100644 --- a/public/script/utils.js +++ b/public/script/utils.js @@ -92,7 +92,7 @@ function generateRandomId(length) { } function parseGithubUrl(url) { - var matches = url.match(/.*?github.com\/([\w-\._]+)\/([\w-\._]+)/); + var matches = url.replace(".git", "").match(/.*?github.com\/([\w-\._]+)\/([\w-\._]+)/); if (matches && matches.length == 3) { return { owner: matches[1],