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 <edgar.silva@cross-join.com>
This commit is contained in:
Edgar Silva
2022-02-17 12:36:09 +00:00
committed by Edgar Silva
parent 2f1050ec10
commit 1bc8c55822
+1 -1
View File
@@ -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(/^\//, ''),
)}`,
);