Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/git-source-provider.ts
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2020-03-25 15:12:22 -0400
committerGitHub <noreply@github.com>2020-03-25 15:12:22 -0400
commit18fd0bc59958dd73f02ac7a98cb5995f83e6f1de (patch)
treeb7dd7374364d23c08a542687b7f9033c9e271bc5 /src/git-source-provider.ts
parente8e736100be926c1708f65609a1458e5e36bda31 (diff)
changes to support ghes alpha release (#199)
Diffstat (limited to 'src/git-source-provider.ts')
-rw-r--r--src/git-source-provider.ts11
1 files changed, 2 insertions, 9 deletions
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<void> {
// 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)) {