mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Handle kind property in registries
This commit is contained in:
5
lib/config-utils.js
generated
5
lib/config-utils.js
generated
@@ -498,8 +498,8 @@ function parseRegistries(registriesInput) {
|
||||
}
|
||||
function parseRegistriesWithoutCredentials(registriesInput) {
|
||||
return parseRegistries(registriesInput)?.map((r) => {
|
||||
const { url, packages } = r;
|
||||
return { url, packages };
|
||||
const { url, packages, kind } = r;
|
||||
return { url, packages, kind };
|
||||
});
|
||||
}
|
||||
function isLocal(configPath) {
|
||||
@@ -623,6 +623,7 @@ function createRegistriesBlock(registries) {
|
||||
// ensure the url ends with a slash to avoid a bug in the CLI 2.10.4
|
||||
url: !registry?.url.endsWith("/") ? `${registry.url}/` : registry.url,
|
||||
packages: registry.packages,
|
||||
kind: registry.kind,
|
||||
}));
|
||||
const qlconfig = {
|
||||
registries: safeRegistries,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -63,6 +63,9 @@ export interface RegistryConfigNoCredentials {
|
||||
|
||||
// List of globs that determine which packs are associated with this registry.
|
||||
packages: string[] | string;
|
||||
|
||||
// Kind of registry, either "github" or "docker". Default is "docker".
|
||||
kind?: "github" | "docker";
|
||||
}
|
||||
|
||||
interface ExcludeQueryFilter {
|
||||
@@ -871,8 +874,8 @@ export function parseRegistriesWithoutCredentials(
|
||||
registriesInput?: string,
|
||||
): RegistryConfigNoCredentials[] | undefined {
|
||||
return parseRegistries(registriesInput)?.map((r) => {
|
||||
const { url, packages } = r;
|
||||
return { url, packages };
|
||||
const { url, packages, kind } = r;
|
||||
return { url, packages, kind };
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1039,6 +1042,7 @@ function createRegistriesBlock(registries: RegistryConfigWithCredentials[]): {
|
||||
// ensure the url ends with a slash to avoid a bug in the CLI 2.10.4
|
||||
url: !registry?.url.endsWith("/") ? `${registry.url}/` : registry.url,
|
||||
packages: registry.packages,
|
||||
kind: registry.kind,
|
||||
}));
|
||||
const qlconfig = {
|
||||
registries: safeRegistries,
|
||||
|
||||
Reference in New Issue
Block a user