Always use api.github.com

The octokit client would default to the URL of enterprise instances and then not be able to find the ruff repo.
This commit is contained in:
Kevin Stillhammer
2025-01-26 17:36:52 +01:00
parent 2993ff4a65
commit 276e678697
4 changed files with 15 additions and 7 deletions
Generated Vendored
+4 -3
View File
@@ -34663,7 +34663,7 @@ async function resolveVersion(versionInput, githubToken) {
return resolvedVersion;
}
async function getAvailableVersions(githubToken) {
const octokit = github.getOctokit(githubToken);
const octokit = github.getOctokit(githubToken, { baseUrl: constants_1.GITHUB_COM_API });
const response = await octokit.paginate(octokit.rest.repos.listReleases, {
owner: constants_1.OWNER,
repo: constants_1.REPO,
@@ -34671,7 +34671,7 @@ async function getAvailableVersions(githubToken) {
return response.map((release) => release.tag_name);
}
async function getLatestVersion(githubToken) {
const octokit = github.getOctokit(githubToken);
const octokit = github.getOctokit(githubToken, { baseUrl: constants_1.GITHUB_COM_API });
const { data: latestRelease } = await octokit.rest.repos.getLatestRelease({
owner: constants_1.OWNER,
repo: constants_1.REPO,
@@ -34820,10 +34820,11 @@ run();
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
exports.GITHUB_COM_API = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
exports.REPO = "ruff";
exports.OWNER = "astral-sh";
exports.TOOL_CACHE_NAME = "ruff";
exports.GITHUB_COM_API = "https://api.github.com";
/***/ }),
+2 -1
View File
@@ -34644,10 +34644,11 @@ run();
"use strict";
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
exports.GITHUB_COM_API = exports.TOOL_CACHE_NAME = exports.OWNER = exports.REPO = void 0;
exports.REPO = "ruff";
exports.OWNER = "astral-sh";
exports.TOOL_CACHE_NAME = "ruff";
exports.GITHUB_COM_API = "https://api.github.com";
/***/ }),