From 7f0cd668b884440bc7d6a66884e247b7774e48a9 Mon Sep 17 00:00:00 2001 From: traverseda Date: Sat, 19 Oct 2024 13:34:28 -0300 Subject: [PATCH] Don't assume protocol is HTTPS While I believe this would work with github enterprise it breaks selfhosted runners like act and gitea/forjego actions. --- src/set-tokens.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/set-tokens.ts b/src/set-tokens.ts index 793970367..f0d183fa6 100644 --- a/src/set-tokens.ts +++ b/src/set-tokens.ts @@ -97,12 +97,12 @@ This operation is prohibited to protect your contents } } - return `https://x-access-token:${githubToken}@${getServerUrl().host}/${publishRepo}.git`; + return `${getServerUrl().host}//x-access-token:${githubToken}@${getServerUrl().host}/${publishRepo}.git`; } export function setPersonalToken(personalToken: string, publishRepo: string): string { core.info('[INFO] setup personal access token'); - return `https://x-access-token:${personalToken}@${getServerUrl().host}/${publishRepo}.git`; + return `${getServerUrl().host}//x-access-token:${personalToken}@${getServerUrl().host}/${publishRepo}.git`; } export function getPublishRepo(externalRepository: string, owner: string, repo: string): string {