From 80ef523595e99c94f0419267a4deb226ed28051e Mon Sep 17 00:00:00 2001 From: nyagami Date: Tue, 6 Feb 2024 23:48:26 +0700 Subject: [PATCH] Fix: git url regex --- scripts/json_plugins.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/json_plugins.ts b/scripts/json_plugins.ts index 77f902a..3c8a6ad 100644 --- a/scripts/json_plugins.ts +++ b/scripts/json_plugins.ts @@ -19,7 +19,7 @@ try { }catch { // } -const matched = REMOTE.match(/github\.com[:/](.+?)\/(.+?)\.git/); +const matched = REMOTE.match(/([^:/]+?)\/([^/.]+)(\.git)?$/); if(!matched) throw Error("Cant parse git url"); const USERNAME = matched[1]; const REPO = matched[2];