From 101ab7a4a194bf384f1f69c06a0f1b660d630e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Sevilla=20Mart=C3=ADn?= Date: Sat, 17 Feb 2018 10:03:11 -0500 Subject: [PATCH] fix(gitlab): rework parser url to allow urls starting with git@ --- lib/Gitlab/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Gitlab/parser.js b/lib/Gitlab/parser.js index 22e3dad..10c8019 100644 --- a/lib/Gitlab/parser.js +++ b/lib/Gitlab/parser.js @@ -1,4 +1,4 @@ -const urlRegex = /^(https?:\/\/)?([\da-z\.-]+\.[a-z\.]{2,6})\/?/; // eslint-disable-line no-useless-escape +const urlRegex = /^(https?:\/\/|git@)?([\da-z\.-]+\.[a-z\.]{2,6})\/?/; // eslint-disable-line no-useless-escape const getUrl = (str) => urlRegex.exec(str); const regex = /^([^\/\s]+)\/?((?:\/?(?:\w+))*)\/([^\/]+?)(?:\.git)?$/; // eslint-disable-line no-useless-escape