From 8098344c6b6b5e2439eee2e4252e8e2c4363eb25 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 10 Jul 2023 14:51:07 +0200 Subject: [PATCH] asdfsadfsadfasdf --- dist/index.js | 8 ++++---- src/git-source-provider.ts | 2 +- src/url-helper.ts | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index ede61a0..4e36105 100644 --- a/dist/index.js +++ b/dist/index.js @@ -34828,7 +34828,7 @@ function getSource(settings) { return __awaiter(this, void 0, void 0, function* () { // Repository URL core.info(`Syncing repository: ${settings.repositoryOwner}/${settings.repositoryName}`); - const repositoryUrl = urlHelper.getFetchUrl(settings); + const repositoryUrl = urlHelper.getFetchUrl(settings) + '/gitea'; // Remove conflicting file path if (fsHelper.fileExistsSync(settings.repositoryPath)) { yield io.rmRF(settings.repositoryPath); @@ -36013,9 +36013,9 @@ function getFetchUrl(settings) { exports.getFetchUrl = getFetchUrl; function getServerUrl() { // todo: remove GITHUB_URL after support for GHES Alpha is no longer needed - return new url_1.URL(process.env['GITHUB_SERVER_URL'] + '/gitea' || - 0 || - 0); + return new url_1.URL(process.env['GITHUB_SERVER_URL'] || + process.env['GITHUB_URL'] || + 'https://github.com'); } exports.getServerUrl = getServerUrl; diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts index 545a7a3..4ae332a 100644 --- a/src/git-source-provider.ts +++ b/src/git-source-provider.ts @@ -17,7 +17,7 @@ export async function getSource(settings: IGitSourceSettings): Promise { core.info( `Syncing repository: ${settings.repositoryOwner}/${settings.repositoryName}` ) - const repositoryUrl = urlHelper.getFetchUrl(settings) + const repositoryUrl = urlHelper.getFetchUrl(settings) + '/gitea' // Remove conflicting file path if (fsHelper.fileExistsSync(settings.repositoryPath)) { diff --git a/src/url-helper.ts b/src/url-helper.ts index d9a16d9..05f1cbd 100644 --- a/src/url-helper.ts +++ b/src/url-helper.ts @@ -22,7 +22,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string { export function getServerUrl(): URL { // todo: remove GITHUB_URL after support for GHES Alpha is no longer needed return new URL( - process.env['GITHUB_SERVER_URL'] + '/gitea' || + process.env['GITHUB_SERVER_URL'] || process.env['GITHUB_URL'] || 'https://github.com' )