mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Use ActionState for getRegistryProxy
This commit is contained in:
10
lib/entry-points.js
generated
10
lib/entry-points.js
generated
@@ -145620,10 +145620,10 @@ function parseRepositoryNwo(input) {
|
||||
// src/api-client.ts
|
||||
var GITHUB_ENTERPRISE_VERSION_HEADER = "x-github-enterprise-version";
|
||||
var DO_NOT_RETRY_STATUSES = [400, 410, 422, 451];
|
||||
function getRegistryProxy(env) {
|
||||
const host = env.getOptional("CODEQL_PROXY_HOST" /* PROXY_HOST */);
|
||||
const port = env.getOptional("CODEQL_PROXY_PORT" /* PROXY_PORT */);
|
||||
const cert = env.getOptional("CODEQL_PROXY_CA_CERTIFICATE" /* PROXY_CA_CERTIFICATE */);
|
||||
function getRegistryProxy(action) {
|
||||
const host = action.env.getOptional("CODEQL_PROXY_HOST" /* PROXY_HOST */);
|
||||
const port = action.env.getOptional("CODEQL_PROXY_PORT" /* PROXY_PORT */);
|
||||
const cert = action.env.getOptional("CODEQL_PROXY_CA_CERTIFICATE" /* PROXY_CA_CERTIFICATE */);
|
||||
if (host && port) {
|
||||
return new import_undici.ProxyAgent({
|
||||
uri: `http://${host}:${port}`,
|
||||
@@ -148091,7 +148091,7 @@ async function getRemoteConfig(actionState, configFile, apiDetails) {
|
||||
const shouldProxyRequest = await actionState.features.getValue(
|
||||
"proxy_api_requests" /* ProxyApiRequests */
|
||||
);
|
||||
const proxy = shouldProxyRequest ? getRegistryProxy(actionState.env) : void 0;
|
||||
const proxy = shouldProxyRequest ? getRegistryProxy(actionState) : void 0;
|
||||
const response = await getApiClientWithExternalAuth(apiDetails, proxy).rest.repos.getContent({
|
||||
owner: address.owner,
|
||||
repo: address.repo,
|
||||
|
||||
Reference in New Issue
Block a user