From 688d12e3be195284cf88f270d443b7d3b57594dc Mon Sep 17 00:00:00 2001 From: Kevin Stillhammer Date: Fri, 28 Feb 2025 16:27:46 +0100 Subject: [PATCH] Always make requests against api.github.com --- dist/setup/index.js | 5 +---- dist/update-known-checksums/index.js | 5 +---- src/utils/octokit.ts | 6 +----- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index c2f8ded..971c7ab 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -122822,7 +122822,7 @@ const plugin_paginate_rest_1 = __nccwpck_require__(93779); const plugin_rest_endpoint_methods_1 = __nccwpck_require__(49210); const undici_1 = __nccwpck_require__(46752); const DEFAULTS = { - baseUrl: getApiBaseUrl(), + baseUrl: "https://api.github.com", userAgent: "setup-uv", }; function getProxyAgent() { @@ -122851,9 +122851,6 @@ exports.Octokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plu }, }; }); -function getApiBaseUrl() { - return process.env.GITHUB_API_URL || "https://api.github.com"; -} /***/ }), diff --git a/dist/update-known-checksums/index.js b/dist/update-known-checksums/index.js index a3054da..c58bb38 100644 --- a/dist/update-known-checksums/index.js +++ b/dist/update-known-checksums/index.js @@ -58103,7 +58103,7 @@ const plugin_paginate_rest_1 = __nccwpck_require__(3779); const plugin_rest_endpoint_methods_1 = __nccwpck_require__(9210); const undici_1 = __nccwpck_require__(6752); const DEFAULTS = { - baseUrl: getApiBaseUrl(), + baseUrl: "https://api.github.com", userAgent: "setup-uv", }; function getProxyAgent() { @@ -58132,9 +58132,6 @@ exports.Octokit = core_1.Octokit.plugin(plugin_paginate_rest_1.paginateRest, plu }, }; }); -function getApiBaseUrl() { - return process.env.GITHUB_API_URL || "https://api.github.com"; -} /***/ }), diff --git a/src/utils/octokit.ts b/src/utils/octokit.ts index 4cf22ba..e96ac05 100644 --- a/src/utils/octokit.ts +++ b/src/utils/octokit.ts @@ -13,7 +13,7 @@ import { fetch as undiciFetch, ProxyAgent, type RequestInit } from "undici"; export type { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"; const DEFAULTS = { - baseUrl: getApiBaseUrl(), + baseUrl: "https://api.github.com", userAgent: "setup-uv", }; @@ -56,7 +56,3 @@ export const Octokit: typeof Core & ); export type Octokit = InstanceType; - -function getApiBaseUrl(): string { - return process.env.GITHUB_API_URL || "https://api.github.com"; -}