diff options
| author | Cory Miller <13227161+cory-miller@users.noreply.github.com> | 2024-04-18 15:29:55 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-18 15:29:55 -0400 |
| commit | 4633477603c1d5195d6b3e1a1a30626d2b3e50d3 (patch) | |
| tree | db24c9dc37c93f81aa1b42fae3f79b0dd6647db5 /src/url-helper.ts | |
| parent | 5cbfe54ddccb7aa81f873dab834f0c6d84fe3682 (diff) | |
Add SSH user parameter (#1685)v4.1.3
* Add a configurable SSH user
* Update docs with param
* Indentation of readme
* formatting woes
* Update src/url-helper.ts
Co-authored-by: Josh Gross <joshmgross@github.com>
* Update action.yml
Co-authored-by: Josh Gross <joshmgross@github.com>
* Update genfiles
---------
Co-authored-by: Josh Gross <joshmgross@github.com>
Diffstat (limited to 'src/url-helper.ts')
| -rw-r--r-- | src/url-helper.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/url-helper.ts b/src/url-helper.ts index 6807b7f..64ecbf3 100644 --- a/src/url-helper.ts +++ b/src/url-helper.ts @@ -12,7 +12,8 @@ export function getFetchUrl(settings: IGitSourceSettings): string { const encodedOwner = encodeURIComponent(settings.repositoryOwner) const encodedName = encodeURIComponent(settings.repositoryName) if (settings.sshKey) { - return `git@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git` + const user = settings.sshUser.length > 0 ? settings.sshUser : 'git' + return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git` } // "origin" is SCHEME://HOSTNAME[:PORT] |
