mirror of
https://github.com/github/codeql-action.git
synced 2026-04-27 01:08:46 +00:00
Put change behind a FF
This commit is contained in:
+18
-2
@@ -224,7 +224,19 @@ function isPAT(value: string) {
|
||||
]);
|
||||
}
|
||||
|
||||
const LANGUAGE_TO_REGISTRY_TYPE: Partial<Record<KnownLanguage, string[]>> = {
|
||||
type RegistryMapping = Partial<Record<KnownLanguage, string[]>>;
|
||||
|
||||
const LANGUAGE_TO_REGISTRY_TYPE: RegistryMapping = {
|
||||
java: ["maven_repository"],
|
||||
csharp: ["nuget_feed"],
|
||||
javascript: ["npm_registry"],
|
||||
python: ["python_index"],
|
||||
ruby: ["rubygems_server"],
|
||||
rust: ["cargo_registry"],
|
||||
go: ["goproxy_server", "git_source"],
|
||||
} as const;
|
||||
|
||||
const NEW_LANGUAGE_TO_REGISTRY_TYPE: RegistryMapping = {
|
||||
actions: [],
|
||||
java: ["maven_repository"],
|
||||
csharp: ["nuget_feed"],
|
||||
@@ -268,9 +280,13 @@ export function getCredentials(
|
||||
registrySecrets: string | undefined,
|
||||
registriesCredentials: string | undefined,
|
||||
language: KnownLanguage | undefined,
|
||||
skipUnusedRegistries: boolean = false,
|
||||
): Credential[] {
|
||||
const registryMapping = skipUnusedRegistries
|
||||
? NEW_LANGUAGE_TO_REGISTRY_TYPE
|
||||
: LANGUAGE_TO_REGISTRY_TYPE;
|
||||
const registryTypeForLanguage = language
|
||||
? LANGUAGE_TO_REGISTRY_TYPE[language]
|
||||
? registryMapping[language]
|
||||
: undefined;
|
||||
|
||||
let credentialsStr: string;
|
||||
|
||||
Reference in New Issue
Block a user