@@ -1453,6 +1453,7 @@ const path = __importStar(__nccwpck_require__(1017));
1453
1453
const retryHelper = __importStar(__nccwpck_require__(2155));
1454
1454
const toolCache = __importStar(__nccwpck_require__(7784));
1455
1455
const v4_1 = __importDefault(__nccwpck_require__(824));
1456
+ const url_helper_1 = __nccwpck_require__(9437);
1456
1457
const IS_WINDOWS = process.platform === 'win32';
1457
1458
function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath, baseUrl) {
1458
1459
return __awaiter(this, void 0, void 0, function* () {
@@ -1513,7 +1514,9 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) {
1513
1514
return yield retryHelper.execute(() => __awaiter(this, void 0, void 0, function* () {
1514
1515
var _a;
1515
1516
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
+ });
1517
1520
let result;
1518
1521
try {
1519
1522
// Get the default branch from the repo info
@@ -1545,7 +1548,9 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) {
1545
1548
exports.getDefaultBranch = getDefaultBranch;
1546
1549
function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) {
1547
1550
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
+ });
1549
1554
const download = IS_WINDOWS
1550
1555
? octokit.rest.repos.downloadZipballArchive
1551
1556
: octokit.rest.repos.downloadTarballArchive;
@@ -2026,7 +2031,7 @@ function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref
2026
2031
if (actualHeadSha !== expectedHeadSha) {
2027
2032
core.debug(`Expected head sha ${expectedHeadSha}; actual head sha ${actualHeadSha}`);
2028
2033
const octokit = github.getOctokit(token, {
2029
- baseUrl: baseUrl,
2034
+ baseUrl: (0, url_helper_1.getServerApiUrl)( baseUrl) ,
2030
2035
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})`
2031
2036
});
2032
2037
yield octokit.rest.repos.get({
0 commit comments