From 1bc8c55822f0e5af9be69ac2d8b85958f6ad5f5f Mon Sep 17 00:00:00 2001 From: Edgar Silva Date: Thu, 17 Feb 2022 12:36:09 +0000 Subject: [PATCH] Changed repoIDLookup to url.origin Changed the repoIDLookup concatenation from 'url.protocol + url.host' to 'url.origin', which does essentially the same but is simpler. Signed-off-by: Edgar Silva --- packages/integration/src/gitlab/core.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integration/src/gitlab/core.ts b/packages/integration/src/gitlab/core.ts index f7dfd26d78..b379d3d129 100644 --- a/packages/integration/src/gitlab/core.ts +++ b/packages/integration/src/gitlab/core.ts @@ -138,7 +138,7 @@ export async function getProjectId( // Convert // to: https://gitlab.com/api/v4/projects/groupA%2Fteams%2FsubgroupA%2FteamA%2Frepo const repoIDLookup = new URL( - `${url.protocol + url.host}/api/v4/projects/${encodeURIComponent( + `${url.origin}/api/v4/projects/${encodeURIComponent( repo.replace(/^\//, ''), )}`, );