Compare commits

...

3 Commits

Author SHA1 Message Date
Cory Miller
eb237700fe Update genfiles 2024-04-18 19:15:40 +00:00
Cory Miller
9acec543f2
Update action.yml
Co-authored-by: Josh Gross <joshmgross@github.com>
2024-04-18 15:13:09 -04:00
Cory Miller
e0908c08dc
Update src/url-helper.ts
Co-authored-by: Josh Gross <joshmgross@github.com>
2024-04-18 15:12:57 -04:00
4 changed files with 4 additions and 2 deletions

View File

@ -64,6 +64,7 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
# The user to use when connecting to the remote SSH host. By default 'git' is
# used.
# Default: git
ssh-user: ''
# Whether to configure the token or SSH key with the local git config

View File

@ -48,6 +48,7 @@ inputs:
ssh-user:
description: >
The user to use when connecting to the remote SSH host. By default 'git' is used.
default: git
persist-credentials:
description: 'Whether to configure the token or SSH key with the local git config'
default: true

2
dist/index.js vendored
View File

@ -2401,7 +2401,7 @@ function getFetchUrl(settings) {
const encodedOwner = encodeURIComponent(settings.repositoryOwner);
const encodedName = encodeURIComponent(settings.repositoryName);
if (settings.sshKey) {
let user = settings.sshUser.length > 0 ? settings.sshUser : 'git';
const user = settings.sshUser.length > 0 ? settings.sshUser : 'git';
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`;
}
// "origin" is SCHEME://HOSTNAME[:PORT]

View File

@ -12,7 +12,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
const encodedOwner = encodeURIComponent(settings.repositoryOwner)
const encodedName = encodeURIComponent(settings.repositoryName)
if (settings.sshKey) {
let user = settings.sshUser.length > 0 ? settings.sshUser : 'git'
const user = settings.sshUser.length > 0 ? settings.sshUser : 'git'
return `${user}@${serviceUrl.hostname}:${encodedOwner}/${encodedName}.git`
}