From 18fd0bc59958dd73f02ac7a98cb5995f83e6f1de Mon Sep 17 00:00:00 2001 From: eric sciple Date: Wed, 25 Mar 2020 15:12:22 -0400 Subject: changes to support ghes alpha release (#199) --- src/git-source-provider.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/git-source-provider.ts') diff --git a/src/git-source-provider.ts b/src/git-source-provider.ts index 4bce702..85806bb 100644 --- a/src/git-source-provider.ts +++ b/src/git-source-provider.ts @@ -8,23 +8,16 @@ import * as io from '@actions/io' import * as path from 'path' import * as refHelper from './ref-helper' import * as stateHelper from './state-helper' +import * as urlHelper from './url-helper' import {IGitCommandManager} from './git-command-manager' import {IGitSourceSettings} from './git-source-settings' -const hostname = 'github.com' - export async function getSource(settings: IGitSourceSettings): Promise { // Repository URL core.info( `Syncing repository: ${settings.repositoryOwner}/${settings.repositoryName}` ) - const repositoryUrl = settings.sshKey - ? `git@${hostname}:${encodeURIComponent( - settings.repositoryOwner - )}/${encodeURIComponent(settings.repositoryName)}.git` - : `https://${hostname}/${encodeURIComponent( - settings.repositoryOwner - )}/${encodeURIComponent(settings.repositoryName)}` + const repositoryUrl = urlHelper.getFetchUrl(settings) // Remove conflicting file path if (fsHelper.fileExistsSync(settings.repositoryPath)) { -- cgit v1.2.3