Default to StartProxyRemoveUnusedRegistries behaviour

This commit is contained in:
Michael B. Gale
2026-05-18 16:17:15 +01:00
parent c8a3492b26
commit 3dc99aad86
6 changed files with 10 additions and 78 deletions
+3 -22
View File
@@ -149475,11 +149475,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "suppressesMissingFileBaselineWarning" /* SuppressesMissingFileBaselineWarning */
},
["start_proxy_remove_unused_registries" /* StartProxyRemoveUnusedRegistries */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_REMOVE_UNUSED_REGISTRIES",
minimumVersion: void 0
},
["start_proxy_use_features_release" /* StartProxyUseFeaturesRelease */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
@@ -160351,15 +160346,6 @@ function isPAT(value) {
]);
}
var LANGUAGE_TO_REGISTRY_TYPE = {
java: ["maven_repository"],
csharp: ["nuget_feed"],
javascript: ["npm_registry"],
python: ["python_index"],
ruby: ["rubygems_server"],
rust: ["cargo_registry"],
go: ["goproxy_server", "git_source"]
};
var NEW_LANGUAGE_TO_REGISTRY_TYPE = {
actions: [],
cpp: [],
java: ["maven_repository"],
@@ -160388,9 +160374,8 @@ function getRegistryAddress(registry) {
);
}
}
function getCredentials(logger, registrySecrets, registriesCredentials, language, skipUnusedRegistries = false) {
const registryMapping = skipUnusedRegistries ? NEW_LANGUAGE_TO_REGISTRY_TYPE : LANGUAGE_TO_REGISTRY_TYPE;
const registryTypeForLanguage = language ? registryMapping[language] : void 0;
function getCredentials(logger, registrySecrets, registriesCredentials, language) {
const registryTypeForLanguage = language ? LANGUAGE_TO_REGISTRY_TYPE[language] : void 0;
let credentialsStr;
if (registriesCredentials !== void 0) {
logger.info(`Using registries_credentials input.`);
@@ -160914,15 +160899,11 @@ async function run7(startedAt) {
);
const languageInput = getOptionalInput("language");
language = languageInput ? parseBuiltInLanguage(languageInput) : void 0;
const skipUnusedRegistries = await features.getValue(
"start_proxy_remove_unused_registries" /* StartProxyRemoveUnusedRegistries */
);
const credentials = getCredentials(
logger,
getOptionalInput("registry_secrets"),
getOptionalInput("registries_credentials"),
language,
skipUnusedRegistries
language
);
if (credentials.length === 0) {
logger.info("No credentials found, skipping proxy setup.");
-5
View File
@@ -89498,11 +89498,6 @@ var featureConfig = {
minimumVersion: void 0,
toolsFeature: "suppressesMissingFileBaselineWarning" /* SuppressesMissingFileBaselineWarning */
},
["start_proxy_remove_unused_registries" /* StartProxyRemoveUnusedRegistries */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_REMOVE_UNUSED_REGISTRIES",
minimumVersion: void 0
},
["start_proxy_use_features_release" /* StartProxyUseFeaturesRelease */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",