From e9130f8f55725747509e642e3b814c18f23036e8 Mon Sep 17 00:00:00 2001 From: Jakob <72307968+jakob30061@users.noreply.github.com> Date: Fri, 8 Sep 2023 00:11:37 +0200 Subject: [PATCH] Add build file --- dist/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 67752ae..993e69a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2371,14 +2371,16 @@ function getFetchUrl(settings) { const encodedOwner = encodeURIComponent(settings.repositoryOwner); const encodedName = encodeURIComponent(settings.repositoryName); if (settings.sshKey) { - return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`; + return serviceUrl.port === '' + ? `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git` + : `ssh://git@${serviceUrl.hostname}:${serviceUrl.port}/${encodedOwner}/${encodedName}.git`; } // "origin" is SCHEME://HOSTNAME[:PORT] return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`; } exports.getFetchUrl = getFetchUrl; function getServerUrl(url) { - let urlValue = url && url.trim().length > 0 + const urlValue = url && url.trim().length > 0 ? url : process.env['GITHUB_SERVER_URL'] || 'https://github.com'; return new url_1.URL(urlValue);