mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-27 14:29:54 +02:00
Inject GitHub host to be able to clone from another GitHub instance (#922)
* Adding the ability to specify the GitHub Server URL and allowing for it to differ from the Actions workflow host * Adding tests for injecting the GitHub URL * Addressing code review comments for PR #922
This commit is contained in:
parent
2541b1294d
commit
e6d535c99c
13 changed files with 220 additions and 67 deletions
|
@ -93,7 +93,8 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
settings.repositoryName,
|
||||
settings.ref,
|
||||
settings.commit,
|
||||
settings.repositoryPath
|
||||
settings.repositoryPath,
|
||||
settings.githubServerUrl
|
||||
)
|
||||
return
|
||||
}
|
||||
|
@ -138,7 +139,8 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
settings.ref = await githubApiHelper.getDefaultBranch(
|
||||
settings.authToken,
|
||||
settings.repositoryOwner,
|
||||
settings.repositoryName
|
||||
settings.repositoryName,
|
||||
settings.githubServerUrl
|
||||
)
|
||||
}
|
||||
core.endGroup()
|
||||
|
@ -232,7 +234,8 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
|||
settings.repositoryOwner,
|
||||
settings.repositoryName,
|
||||
settings.ref,
|
||||
settings.commit
|
||||
settings.commit,
|
||||
settings.githubServerUrl
|
||||
)
|
||||
} finally {
|
||||
// Remove auth
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue