mirror of
https://code.forgejo.org/actions/checkout.git
synced 2025-04-24 04:15:33 +00:00
restore passing baseUrl
where appropriate
This commit is contained in:
parent
df4b58c789
commit
2f42443dda
3 changed files with 39 additions and 15 deletions
|
@ -88,7 +88,7 @@ export async function getDefaultBranch(
|
|||
return await retryHelper.execute(async () => {
|
||||
core.info('Retrieving the default branch name')
|
||||
const octokit = github.getOctokit(authToken, {
|
||||
baseUrl: getServerApiUrl()
|
||||
baseUrl: getServerApiUrl(baseUrl)
|
||||
})
|
||||
let result: string
|
||||
try {
|
||||
|
@ -131,7 +131,7 @@ async function downloadArchive(
|
|||
baseUrl?: string
|
||||
): Promise<Buffer> {
|
||||
const octokit = github.getOctokit(authToken, {
|
||||
baseUrl: getServerApiUrl()
|
||||
baseUrl: getServerApiUrl(baseUrl)
|
||||
})
|
||||
const download = IS_WINDOWS
|
||||
? octokit.rest.repos.downloadZipballArchive
|
||||
|
|
|
@ -192,7 +192,7 @@ export async function checkCommitInfo(
|
|||
): Promise<void> {
|
||||
try {
|
||||
// GHES?
|
||||
if (isGhes()) {
|
||||
if (isGhes(baseUrl)) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -249,7 +249,7 @@ export async function checkCommitInfo(
|
|||
`Expected head sha ${expectedHeadSha}; actual head sha ${actualHeadSha}`
|
||||
)
|
||||
const octokit = github.getOctokit(token, {
|
||||
baseUrl: getServerApiUrl(),
|
||||
baseUrl: getServerApiUrl(baseUrl),
|
||||
userAgent: `actions-checkout-tracepoint/1.0 (code=STALE_MERGE;owner=${repositoryOwner};repo=${repositoryName};pr=${fromPayload(
|
||||
'number'
|
||||
)};run_id=${
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue