@@ -1453,6 +1453,7 @@ const path = __importStar(__nccwpck_require__(1017));
14531453const retryHelper = __importStar(__nccwpck_require__(2155));
14541454const toolCache = __importStar(__nccwpck_require__(7784));
14551455const v4_1 = __importDefault(__nccwpck_require__(824));
1456+ const url_helper_1 = __nccwpck_require__(9437);
14561457const IS_WINDOWS = process.platform === 'win32';
14571458function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath, baseUrl) {
14581459 return __awaiter(this, void 0, void 0, function* () {
@@ -1513,7 +1514,9 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) {
15131514 return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
15141515 var _a;
15151516 core.info('Retrieving the default branch name');
1516- const octokit = github.getOctokit(authToken, { baseUrl: baseUrl });
1517+ const octokit = github.getOctokit(authToken, {
1518+ baseUrl: (0, url_helper_1.getServerApiUrl)(baseUrl)
1519+ });
15171520 let result;
15181521 try {
15191522 // Get the default branch from the repo info
@@ -1545,7 +1548,9 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) {
15451548exports.getDefaultBranch = getDefaultBranch;
15461549function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) {
15471550 return __awaiter(this, void 0, void 0, function* () {
1548- const octokit = github.getOctokit(authToken, { baseUrl: baseUrl });
1551+ const octokit = github.getOctokit(authToken, {
1552+ baseUrl: (0, url_helper_1.getServerApiUrl)(baseUrl)
1553+ });
15491554 const download = IS_WINDOWS
15501555 ? octokit.rest.repos.downloadZipballArchive
15511556 : octokit.rest.repos.downloadTarballArchive;
@@ -2026,7 +2031,7 @@ function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref
20262031 if (actualHeadSha !== expectedHeadSha) {
20272032 core.debug(`Expected head sha ${expectedHeadSha}; actual head sha ${actualHeadSha}`);
20282033 const octokit = github.getOctokit(token, {
2029- baseUrl: baseUrl,
2034+ baseUrl: (0, url_helper_1.getServerApiUrl)( baseUrl) ,
20302035 userAgent: `actions-checkout-tracepoint/1.0 (code=STALE_MERGE;owner=${repositoryOwner};repo=${repositoryName};pr=${fromPayload('number')};run_id=${process.env['GITHUB_RUN_ID']};expected_head_sha=${expectedHeadSha};actual_head_sha=${actualHeadSha})`
20312036 });
20322037 yield octokit.rest.repos.get({
0 commit comments